Class DxfLayerViewportProperties
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
How a layer looks in one viewport, as AutoCAD's LayerViewportProperties: its colour, linetype, lineweight,
transparency and plot style there, as GetViewportOverrides(DxfViewport) gives them, read and set.
public sealed class DxfLayerViewportProperties
- Inheritance
-
DxfLayerViewportProperties
- Inherited Members
Remarks
AutoCAD keeps the overrides of a layer in XRECORDs of its extension dictionary, one for each property, each a list of
a viewport (335) and its value: ADSK_XREC_LAYER_COLOR_OVR a colour (420, 0xC3 and the index above its 24 bits, or 0xC2
and red, green and blue), ADSK_XREC_LAYER_LINETYPE_OVR a linetype (343), ADSK_XREC_LAYER_LINEWT_OVR a lineweight (91),
ADSK_XREC_LAYER_ALPHA_OVR a transparency (440), ADSK_XREC_LAYER_PLOTSTYLE_OVR a plot style name (344). The layer steel
in red, overridden blue in one viewport, reads blue there with IsColorOverridden true, and red in every
other. Set, an override is written as AutoCAD 2021 writes one: steel given the colour 1 in the viewport 226 holds the
XRECORD ADSK_XREC_LAYER_COLOR_OVR of 102 {ADSK_LYR_COLOR_OVERRIDE, 335 226, 420 -1023410175, 102 }, the
extension dictionary made where the layer has none, and the list of another viewport kept after it.
Properties
- Color
Gets or sets the colour of the layer in the viewport, as AutoCAD's
Color: the override, of the index or a true colour, else the layer's Color.
- IsColorOverridden
Gets whether the layer's colour is overridden in the viewport, as AutoCAD's
IsColorOverridden.
- IsLineWeightOverridden
Gets whether the layer's lineweight is overridden in the viewport, as AutoCAD's
IsLineWeightOverridden.
- IsLinetypeOverridden
Gets whether the layer's linetype is overridden in the viewport, as AutoCAD's
IsLinetypeOverridden.
- IsPlotStyleOverridden
Gets whether the layer's plot style is overridden in the viewport, as AutoCAD's
IsPlotStyleOverridden.
- IsTransparencyOverridden
Gets whether the layer's transparency is overridden in the viewport, as AutoCAD's
IsTransparencyOverridden.
- Layer
Gets the layer.
- LineWeight
Gets or sets the lineweight of the layer in the viewport, as AutoCAD's
LineWeight: the override, else the layer's.
- Linetype
Gets or sets the name of the linetype of the layer in the viewport, as AutoCAD's
LinetypeObjectIdnames it: the linetype the override names by handle, else the layer's LinetypeName.
- PlotStyleName
Gets or sets the name of the plot style of the layer in the viewport, as AutoCAD's
PlotStyleName: the entry of the drawing's plot style names (ACAD_PLOTSTYLENAME) the override names by handle, else the one the layer names (its group 390); empty where neither names one, as in a drawing plotted by colour.
- Transparency
Gets or sets the transparency of the layer in the viewport, as AutoCAD's
Transparency: the override, else the layer's.
- Viewport
Gets the viewport, as AutoCAD's
ViewportIdnames it.
Methods
- RemoveColorOverride()
Takes out the override of the layer's colour in the viewport, as AutoCAD's
RemoveColorOverride; nothing where it has none.
- RemoveLineWeightOverride()
Takes out the override of the layer's lineweight in the viewport, as AutoCAD's
RemoveLineWeightOverride; nothing where it has none.
- RemoveLinetypeOverride()
Takes out the override of the layer's linetype in the viewport, as AutoCAD's
RemoveLinetypeOverride; nothing where it has none.
- RemovePlotStyleOverride()
Takes out the override of the layer's plot style in the viewport, as AutoCAD's
RemovePlotStyleOverride; nothing where it has none.
- RemoveTransparencyOverride()
Takes out the override of the layer's transparency in the viewport, as AutoCAD's
RemoveTransparencyOverride; nothing where it has none.
- ToString()
Gives the properties as a line for debugging: the layer and the viewport.