Method SetGridColor
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
SetGridColor(int, int, DxfGridLineType, DxfColor)
Sets the colour of lines of a cell, as AutoCAD's SetGridColor(row, column, gridLineType, color): the cell's own
of each edge the lines name (top 69, right 65, bottom 66, left 68), of the index, its flag (0x40 to 0x200) set in its
177 (91 from R2007 on), and the edge in the cell's edge flags (172: 1 top, 2 right, 4 bottom, 8 left), without which
AutoCAD 2021 reads no line of a cell, wherever its group stands: the bottom of (1, 1) set red, 172 4 and 66 1;
OuterGridLines gives all four, the lines inside, a block's, none of a cell alone. AutoCAD
writes a line between two cells as the top or the left of the cell below or right of it, and reads it from that cell
where it holds the line (GetGridColor(int, int, DxfGridLineType)): the bottom or right of a cell set is
set on that cell too where it holds the line, so that the bottom of (1, 1) set red reads red beside a top of (2, 1)
green; and a top or left the cell does not hold takes first the properties of the line the cell above or left of it
holds, so that it keeps those not set. Set on the top left cell of a block of merged cells, a line is given to the cells
along the block as AutoCAD reads a block from a file: the top (and the left) along its first row (column), the bottom
along a block of one row and the right along one of one column, a line another cell holds of its own kept: the top of
(1, 1) merged with (1, 2) set 50 reads 50 at (1, 2) too. The block AutoCAD drew the table with is not drawn anew.
public void SetGridColor(int row, int column, DxfGridLineType gridLineType, DxfColor color)
Parameters
rowintThe row, from nought.
columnintThe column, from nought.
gridLineTypeDxfGridLineTypeThe lines, one or more of the cell's four.
colorDxfColorThe colour: of the index, BYLAYER or BYBLOCK.
Exceptions
- ArgumentNullException
Thrown when the colour is null.
- ArgumentOutOfRangeException
Thrown when the cell is not one of the table's, or the lines hold a flag none of DxfGridLineType has.
- ArgumentException
Thrown when the lines name none of the cell's four, or the colour is a true colour or none.
- InvalidOperationException
Thrown when the table is erased.
SetGridColor(DxfColor, DxfGridLineType, DxfRowType)
Sets the colour of lines of the rows of kinds, as AutoCAD's SetGridColor(color, borders, rows): the table's
own of each line and kind, of the index, written in place or put in its head after its flags in the order AutoCAD
writes them, its flag set in 94, as AutoCAD 2021 wrote and read them in a drawing of R2018 and of R2000 alike, where
it read those the library put in after the last cell as none (D28e v27); after the last cell only where the table
holds its own there already: the title's lines across the top and inside, SetGridColor(color, HorizontalTop |
HorizontalInside, TitleRow), set the flags 1 and 2. The cells' own edges are left as they are. The block AutoCAD
drew the table with is not drawn anew.
public void SetGridColor(DxfColor color, DxfGridLineType borders, DxfRowType rows)
Parameters
colorDxfColorThe colour: of the index, BYLAYER or BYBLOCK.
bordersDxfGridLineTypeThe lines, one or more of the six.
rowsDxfRowTypeThe rows, one or more of the title, the header and the data.
Exceptions
- ArgumentNullException
Thrown when the colour is null.
- ArgumentOutOfRangeException
Thrown when the lines or the rows are none, or hold a flag none of their kind has.
- ArgumentException
Thrown when the colour is a true colour or none.
- InvalidOperationException
Thrown when the table is erased.