Table of Contents

Class DxfTableStyle

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

The cell styles of a table style beyond the title, the header and the data: the ones a user makes with Create New Cell Style, which AutoCAD 2021 keeps in the table style's CELLSTYLEMAP (under the entry ACAD_ROUNDTRIP_2008_TABLESTYLE_CELLSTYLEMAP of its extension dictionary), each with the table format it was made of, its id (101 on) and its name; and the cell style a cell takes, the id in its TABLECONTENT.

public sealed class DxfTableStyle : DxfDBObject
Inheritance
DxfTableStyle
Inherited Members

Remarks

The record holds its own groups after 100 AcDbTableStyle, then the cells of the data, the title and the header in that order, each opening with its text style (7): its height (140), alignment (170), text colour (62), fill colour (63) and whether the fill is on (283), from R2007 on the kind of its value (90, 91, 1), then for each of its six lines, top, inside and bottom across and left, inside and right down, its lineweight (274 to 279), whether it is drawn (284 to 289) and its colour (64 to 69). A group the record leaves out reads as AutoCAD's Standard has it: the data top centre and the rest middle centre, the text by block in the style Standard, no fill, every line drawn by block. The heights of AutoCAD's Standard are those of the drawing's units: the title 6 and the header and the data 4.5 high, margins of 1.5, in a drawing of millimetres, and 0.25, 0.18 and 0.06 in one of inches.

A style made by new DxfTableStyle() has the values of AutoCAD's Standard in millimetres, and is added to a drawing by SetAt(string, DxfDBObject) of its dictionary of table styles: db.TableStyleDictionary.SetAt("GH_SCHEDULE", style). The record written is the form AutoCAD reads from R2000 on, with no map of cell styles: the title, the header and the data are its three cell styles.

Constructors

DxfTableStyle()

Initializes a table style in no file, of the values of AutoCAD's Standard in a drawing of millimetres: margins of 1.5, the title 6 and the header and the data 4.5 high in the text style Standard, the data top centre and the rest middle centre, no fill, every line drawn by block; to be added to a drawing by SetAt(string, DxfDBObject).

Properties

Description

Gets or sets the description of the style (group 3), as AutoCAD's Description; empty where it has none.

FlowDirection

Gets or sets which way the rows of a table of the style follow one another (group 70: 0 down, 1 up), as AutoCAD's FlowDirection: TopToBottom or BottomToTop.

HorizontalCellMargin

Gets or sets the margin left and right of a cell's content (group 40), as AutoCAD's HorizontalCellMargin.

IsHeaderSuppressed

Gets or sets whether a table of the style leaves its header out (group 281), as AutoCAD's IsHeaderSuppressed.

IsTitleSuppressed

Gets or sets whether a table of the style leaves its title out (the second 280), as AutoCAD's IsTitleSuppressed.

Name

Gets the name of the style, as AutoCAD's Name: the name of its entry in the dictionary that owns it, as Standard; null for a style in no file, or one no dictionary names.

VerticalCellMargin

Gets or sets the margin above and below a cell's content (group 41), as AutoCAD's VerticalCellMargin.

Methods

AddCellStyle(string, string)

Makes a cell style of a name from one of the style's, as Create New Cell Style does: the new style takes the look of the one named (its table format copied into the table style's CELLSTYLEMAP, which a style the library holds is given first as Save(string) gives it), its id the next of 101 on.

Alignment(DxfRowType)

Gets where the content of a cell of a kind of row stands (group 170), as AutoCAD's Alignment(rowType).

BackgroundColor(DxfRowType)

Gets the colour the cells of a kind of row are filled with (group 63), as AutoCAD's BackgroundColor(rowType); 7 where the record gives none.

Color(DxfRowType)

Gets the colour of the text of a kind of row (group 62), as AutoCAD's Color(rowType); by block where the record gives none.

DataType(DxfRowType)

Gets what kind of value, and in which unit, the cells of a kind of row hold (groups 90 and 91), as AutoCAD's GetDataType(rowType): General and Unitless where the record gives none, as a style of a file before R2007, which has no place for them, answers. A currency has the kind Double and the unit Currency.

Format(DxfRowType)

Gets the format string of the cells of a kind of row (group 1), as AutoCAD's GetFormat(rowType): %lu2%pr2 for a number of two places; empty where the record gives none.

GetCellStyleId(string)

Gets the id of a cell style by its name: 1 for Title, 2 for Header, 3 for Data, 101 on for those a user made; the id a cell of the TABLECONTENT names (GetCellStyleId(int, int)).

GetCellStyleLook(string)

Gets what a cell style gives its cells: the look of Title, Header or Data as the style holds it, or of a cell style a user made as its table format in the CELLSTYLEMAP holds it, the lines by the numbers of their entries.

GetCellStyleName(int)

Gets the name of the cell style of an id (GetCellStyleId(string)); null where the style has none.

GetCellStyleNames()

Gets the names of the cell styles of the style: Title, Header and Data, then those a user made in the order they were made. A style whose CELLSTYLEMAP is not made yet, as the library makes it when the drawing is saved, has the three.

GridColor(DxfGridLineType, DxfRowType)

Gets the colour of a line of a kind of row (groups 64 to 69), as AutoCAD's GridColor(gridLineType, rowType); by block where the record gives none.

GridLineWeight(DxfGridLineType, DxfRowType)

Gets the lineweight of a line of a kind of row (groups 274 to 279), as AutoCAD's GridLineWeight(gridLineType, rowType); by block where the record gives none.

GridVisibility(DxfGridLineType, DxfRowType)

Gets whether a line of a kind of row is drawn (groups 284 to 289), as AutoCAD's GridVisibility(gridLineType, rowType); drawn where the record gives none.

HasCellStyle(string)

Whether the style has a cell style of the name (Title, Header, Data or one a user made), whatever the case.

IsBackgroundColorNone(DxfRowType)

Gets whether the cells of a kind of row are left unfilled (group 283 of 0), as AutoCAD's IsBackgroundColorNone(rowType); true where the record gives none.

RemoveCellStyle(string)

Takes a cell style a user made out of the style, as Delete does in Manage Cell Styles: its entry out of the CELLSTYLEMAP. The cells that took it keep the look they were given, and name no style any more.

RenameCellStyle(string, string)

Renames a cell style a user made, as Rename does in Manage Cell Styles.

SetAlignment(DxfCellAlignment, DxfRowType)

Sets where the content of the cells of kinds of row stands, as AutoCAD's SetAlignment(alignment, rowTypes).

SetBackgroundColor(DxfColor, DxfRowType)

Sets the colour the cells of kinds of row are filled with and turns the fill on, as AutoCAD's SetBackgroundColor(color, rowTypes).

SetBackgroundColorNone(bool, DxfRowType)

Sets whether the cells of kinds of row are left unfilled, as AutoCAD's SetBackgroundColorNone(value, rowTypes).

SetColor(DxfColor, DxfRowType)

Sets the colour of the text of kinds of row, as AutoCAD's SetColor(color, rowTypes).

SetDataType(DxfDataType, DxfUnitType, DxfRowType)

Sets the kind of value and its unit the cells of kinds of row hold, as AutoCAD's SetDataType(dataType, unitType, rowTypes).

SetFormat(string, DxfRowType)

Sets the format string of the cells of kinds of row, as AutoCAD's SetFormat(format, rowTypes).

SetGridColor(DxfColor, DxfGridLineType, DxfRowType)

Sets the colour of lines of kinds of row, as AutoCAD's SetGridColor(color, borders, rowTypes).

SetGridLineWeight(DxfLineWeight, DxfGridLineType, DxfRowType)

Sets the lineweight of lines of kinds of row, as AutoCAD's SetGridLineWeight(lineWeight, borders, rowTypes).

SetGridVisibility(bool, DxfGridLineType, DxfRowType)

Sets whether lines of kinds of row are drawn, as AutoCAD's SetGridVisibility(visible, borders, rowTypes).

SetTextHeight(double, DxfRowType)

Sets the height of the text of kinds of row, as AutoCAD's SetTextHeight(height, rowTypes).

SetTextStyle(string, DxfRowType)

Sets the text style of kinds of row, as AutoCAD's SetTextStyle(id, rowTypes), by its name.

TextHeight(DxfRowType)

Gets the height of the text of a kind of row (group 140), as AutoCAD's TextHeight(rowType).

TextStyleName(DxfRowType)

Gets the name of the text style of a kind of row (group 7), as AutoCAD's TextStyle(rowType) gives its id: Standard where the record gives none.

ToString()

Gives the style as a line for debugging: its type and its handle.