Click or drag to resize

Layer Methods

The Layer type exposes the following members.

Methods
  NameDescription
Public methodClearId
Resets the HasId property of the model component to false, if possible.
(Inherited from ModelComponent.)
Public methodClearIndex
Resets the HasIndex property of the model component to false, if possible.
(Inherited from ModelComponent.)
Public methodClearName
Resets the HasName property of the model component to false, if possible.
(Inherited from ModelComponent.)
Public methodCopyAttributesFrom
Copy typical attributes from another layer
Public methodDataCRC
Increments the Cyclic Redundancy Check value by this instance.
(Inherited from ModelComponent.)
Public methodDefault
Sets layer to default settings.
Public methodDeleteAllUserStrings
Public methodDeleteModelVisible
Remove any model visibility setting so the layer's global setting will be used for all viewports.
Public methodDeletePerViewportColor
Remove any per viewport layer color setting so the layer's overall setting will be used for all viewports.
Public methodDeletePerViewportPlotColor
Remove any per viewport layer plot color setting so the layer's overall setting will be used for all viewports.
Public methodDeletePerViewportPlotWeight
Remove any per viewport layer plot weight setting so the layer's overall setting will be used for all viewports.
Public methodDeletePerViewportSettings
Deletes per viewport layer settings.
Public methodDeletePerViewportVisible
Remove any per viewport visibility setting so the layer's overall setting will be used for all viewports.
Public methodDeleteUserString
Public methodDispose
Actively reclaims unmanaged resources that this instance uses.
(Inherited from CommonObject.)
Public methodEnsurePrivateCopy
If you want to keep a copy of this class around by holding onto it in a variable after a command completes, call EnsurePrivateCopy to make sure that this class is not tied to the document. You can call this function as many times as you want.
(Inherited from CommonObject.)
Public methodEquals(Layer)
Public methodEquals(Object) (Overrides ObjectEquals(Object).)
Public methodGetChildren
Gets immediate children of this layer. Note that child layers may have their own children.
Public methodGetChildren(Boolean)
Gets the children of this layer.
Public methodGetCustomSectionStyle
Get an optional custom section style associated with these attributes.
Public methodStatic memberGetDefaultLayerProperties
Constructs a layer with the current default properties. The default layer properties are:

color = Rhino.ApplicationSettings.AppearanceSettings.DefaultLayerColor

line style = Rhino.ApplicationSettings.AppearanceSettings.DefaultLayerLineStyle

material index = -1

IGES level = -1

mode = NormalLayer

name = empty

layer index = 0 (ignored by AddLayer)

Public methodGetHashCode (Overrides ObjectGetHashCode.)
Public methodStatic memberGetLeafName(Layer)
Get a layer name's "leaf" level name
Public methodStatic memberGetLeafName(String)
Get a layer name's "leaf" level name
Public methodGetObjectData
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
(Inherited from CommonObject.)
Public methodStatic memberGetParentName(Layer)
Get a layer's "parent" path name
Public methodStatic memberGetParentName(String)
Get a layer's "parent" path name
Public methodGetPersistentLocking
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.
Public methodGetPersistentVisibility
The global persistent visibility 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.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUserString
Gets user string from this geometry.
Public methodGetUserStrings
Gets a copy of all (user key string, user value string) pairs attached to this geometry.
Public methodHasPerViewportSettings
Verifies that a layer has per viewport settings.
Public methodHasSelectedObjects
Returns true if the layer has one or more selected Rhino objects.
Public methodIsChildOf(Guid)
Public methodIsChildOf(Int32)
Public methodIsChildOf(Layer)
Public methodIsParentOf(Guid)
Public methodIsParentOf(Int32)
Public methodIsParentOf(Layer)
Public methodIsValidWithLog
Determines if an object is valid. Also provides a report on errors if this object happens not to be valid.
(Inherited from CommonObject.)
Public methodLockId
Locks the component Id property.
(Inherited from ModelComponent.)
Public methodLockIndex
Locks the component Index property.
(Inherited from ModelComponent.)
Public methodLockName
Locks the component Name property.
(Inherited from ModelComponent.)
Public methodParentLayer
Returns parent of a layer.
Public methodPerViewportColor
Gets the display color for this layer.
Public methodPerViewportIsVisible
Gets the per viewport visibility of this layer.
Public methodPerViewportPersistentVisibility
Gets the per layer persistent visibility. The persistent viability setting is used for layers whose visibility can be changed by a parent layer. 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.
Public methodPerViewportPlotColor
Gets the plot color for this layer.
Public methodPerViewportPlotWeight
Gets the plot weight, in millimeters, for this layer.
Public methodRemoveCustomSectionStyle
Public methodSetCustomSectionStyle
Public methodSetPersistentLocking
Set the persistent locking setting for this layer
Public methodSetPersistentVisibility
Set the global persistent visibility setting for this layer.
Public methodSetPerViewportColor
Sets the display color for this layer.
Public methodSetPerViewportPersistentVisibility
Sets the per layer persistent visibility. The persistent viability setting is used for layers whose visibility can be changed by a parent layer. 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.
Public methodSetPerViewportPlotColor
Sets the plot color for this layer.
Public methodSetPerViewportPlotWeight
Sets the plot weight, in millimeters, for this layer.
Public methodSetPerViewportVisible
Controls layer visibility in specific viewports.
Public methodSetUserString
Attach a user string (key,value combination) to this geometry.
Public methodToJSON
Create a JSON string representation of this object
(Inherited from CommonObject.)
Public methodToString (Overrides ModelComponentToString.)
Public methodUnsetModelPersistentVisibility
Remove any model persistent visibility setting from this layer.
Public methodUnsetPersistentLocking
Remove any explicitly persistent locking settings from this layer
Public methodUnsetPersistentVisibility
Remove any explicit persistent visibility setting from this layer
Public methodUnsetPerViewportPersistentVisibility
Remove any per viewport persistent visibility setting so the layer's overall setting will be used for all viewports.
Top
See Also