When a component is in a model as part of the information required for a linked instance definition, this value identifies the linked instance definition reference model.
Remarks: Reference components are not saved in .3dm archives. Typically this value is set and locked by the code that adds a component to a model. This value is not saved in .3dm archives.
If true this object may not be modified. Any properties or functions that attempt to modify this object when it is set to "IsReadOnly" will throw a NotSupportedException.
Return true if the layer is visible in user interfaces that display layers. Returns false if the layer not visible in user interfaces. This is a runtime property that does not persist in .3dm files. This property is also used by the Layers panel to filter layers.
Gets or sets the model persistent visibility of this layer. 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.
Remarks: If the component is being managed by a model, this value identifies the model. In Rhino, this value is the document runtime serial number. Typically this value is set and locked by the code that adds a component to a model. This value is not saved in .3dm archives.
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.
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.
Remarks: Reference components are not saved in .3dm archives. Typically this value is set and locked by the code that adds a component to a model. This value is not saved in .3dm archives.
Gets or sets the RenderMaterial for objects on this layer that have MaterialSource() == MaterialFromLayer. A null result indicates that no RenderMaterial has been assigned and the material created by the default Material constructor or the RenderMaterialIndex should be used.
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.
This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.
You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.
Also, you must call the base virtual method within your overriding method.
true if the call comes from the Dispose() method; false if it comes from the Garbage Collector finalizer.
EnsurePrivateCopy
publicvoidEnsurePrivateCopy()
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.
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.
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.
Remarks: Returns true if this layer's visibility is controlled by a parent object and the parent is turned on (after being off), then this layer will also be turned on. Returns false if this layer's visibility is controlled by a parent object and the parent layer is turned on (after being off), then this layer will continue to be off. When the persistent viability is not explicitly set, this property returns the current value of IsVisible
If true, the search will include objects that have some subset of the object selected, like some edges of a Brep. If false, objects where the entire object is not selected are ignored.
Returns: true if the layer has selected Rhino objects, false otherwise.
If true, the root level parent is returned. The root level parent never has a parent. If false, the immediate parent is returned. The immediate parent may have a parent.
Returns: The parent layer, or null if the layer does not have a parent.
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.
Returns: Return true if this layer's visibility in the specified viewport is controlled by a parent object and the parent is turned on (after being off), then this layer will also be turned on in the specified viewport. Returns false if this layer's visibility in the specified viewport is controlled by a parent object and the parent layer is turned on(after being off), then this layer will continue to be off in the specified viewport.
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.
If not Guid.Empty, then the setting applies only to the viewport with the specified id. If Guid.Empty, then the setting applies to all viewports with per viewport layer settings.
If true, this layer's visibility in the specified viewport is controlled by a parent object and the parent is turned on (after being off), then this layer will also be turned on in the specified viewport. If false, this layer's visibility in the specified viewport is controlled by a parent object and the parent layer is turned on (after being off), then this layer will continue to be off in the specified viewport.
The plot weight 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.
If not Guid.Empty, then the setting applies only to the viewport with the specified id. If Guid.Empty, then the setting applies to all viewports with per viewport layer settings.