Layer

Layer

Layer

Constructor

new Layer()

Extends

Members

color :System.Drawing.Color

Gets or sets the display color for this layer.
Type:
  • System.Drawing.Color

expanded

fullPath :string

Gets the full path to this layer. The full path includes nesting information.
Type:
  • string

id :Guid

Gets or sets the ID of this layer object. You typically do not need to assign a custom ID.
Type:
  • Guid

igesLevel :int

Gets or sets the IGES level for this layer.
Type:
  • int

isValid :bool

Inherited From:
Tests an object to see if it is valid.
Type:
  • bool

linetypeIndex :int

Gets or sets the line-type index for this layer.
Type:
  • int

locked

name :string

Gets or sets the name of this layer.
Type:
  • string

parentLayerId :Guid

Gets the ID of the parent layer. Layers can be organized in a hierarchical structure, in which case this returns the parent layer ID. If the layer has no parent, Guid.Empty will be returned.
Type:
  • Guid

plotColor :System.Drawing.Color

Gets or sets the plot color for this layer.
Type:
  • System.Drawing.Color

plotWeight :double

Gets or sets the weight of the plotting pen in millimeters. A weight of 0.0 indicates the "default" pen weight should be used. A weight of -1.0 indicates the layer should not be printed.
Type:
  • double

renderMaterialIndex :int

Gets or sets the index of render material for objects on this layer that have MaterialSource() == MaterialFromLayer. A material index of -1 indicates no material has been assigned and the material created by the default Material constructor should be used.
Type:
  • int

userStringCount

Inherited From:

visible

Methods

deletePerViewportColor(viewportId)

Remove any per viewport layer color setting so the layer's overall setting will be used for all viewports.
Parameters:
Name Type Description
viewportId Guid If not Guid.Empty, then the setting for this viewport will be deleted. If Guid.Empty, the all per viewport layer color settings will be removed.

deletePerViewportSettings(viewportId)

Deletes per viewport layer settings.
Parameters:
Name Type Description
viewportId Guid If not Guid.Empty, then the settings for that viewport are deleted. If Guid.Empty, then all per viewport settings are deleted.

encode()

Inherited From:
...

getPersistentLocking()

The persistent locking setting is used for layers that can be locked by a "parent" object. A common case is when a layer is a child layer (Layer.ParentI is not nil). In this case, when a parent layer is locked, then child layers are also locked. The persistent locking setting determines what happens when the parent is unlocked again.

getPersistentVisibility()

The persistent viability setting is used for layers whose visibility can be changed by a "parent" object. A common case is when a layer is a child layer (ParentId is not nil). In this case, when a parent layer is turned off, then child layers are also turned off. The persistent visibility setting determines what happens when the parent is turned on again.

getUserString()

Inherited From:
...

getUserStrings()

Inherited From:
...

hasPerViewportSettings(viewportId) → {bool}

Verifies that a layer has per viewport settings.
Parameters:
Name Type Description
viewportId Guid If not Guid.Empty, then checks for settings for that specific viewport. If Guid.Empty, then checks for any viewport settings.
Returns:
True if the layer has per viewport settings, false otherwise.
Type
bool

perViewportColor(viewportId) → {System.Drawing.Color}

Gets the display color for this layer.
Parameters:
Name Type Description
viewportId Guid If not Guid.Empty, then the setting applies only to the viewport with the specified id.
Returns:
The display color.
Type
System.Drawing.Color

rdkXml()

Inherited From:
...

setPersistentLocking()

Set the persistent locking setting for this layer

setPersistentVisibility()

Set the persistent visibility setting for this layer

setPerViewportColor(viewportId, color)

Sets the display color for this layer.
Parameters:
Name Type Description
viewportId Guid If not Guid.Empty, then the setting applies only to the viewport with the specified id.
color System.Drawing.Color The display color.

setUserString()

Inherited From:
...

toJSON()

Inherited From:
Create a JSON string representation of this object

unsetPersistentLocking()

Remove any explicitly persistent locking settings from this layer

unsetPersistentVisibility()

Remove any explicit persistent visibility setting from this layer