Click or drag to resize

LayerTable Class

[Missing <summary> documentation for "T:Rhino.DocObjects.Tables.LayerTable"]

Inheritance Hierarchy
SystemObject
  Rhino.DocObjects.TablesLayerTable

Namespace:  Rhino.DocObjects.Tables
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public sealed class LayerTable : IEnumerable<Layer>, 
	IEnumerable

The LayerTable type exposes the following members.

Properties
  NameDescription
Public propertyActiveCount
Returns number of layers in the layer table, excluding deleted layers.
Public propertyComponentType (Overrides CommonComponentTableTComponentType.)
Public propertyCount
Returns number of layers in the layer table, including deleted layers.
Public propertyCode exampleCurrentLayer
At all times, there is a "current" layer. Unless otherwise specified, new objects are assigned to the current layer. The current layer is never locked, hidden, or deleted. Returns reference to the current layer. Note that this reference may become invalid after a call to AddLayer().
Public propertyCode exampleCurrentLayerIndex
At all times, there is a "current" layer. Unless otherwise specified, new objects are assigned to the current layer. The current layer is never locked, hidden, or deleted. Resturns: Zero based layer table index of the current layer.
Public propertyDocument
Document that owns this table.
Public propertyItem
Conceptually, the layer table is an array of layers. The operator[] can be used to get individual layers. A layer is either active or deleted and this state is reported by Layer.IsDeleted.
Top
Methods
  NameDescription
Public methodAdd
Adds a new layer with default definition to the layer table.
Public methodCode exampleAdd(Layer)
Adds a new layer with specified definition to the layer table.
Public methodCode exampleAdd(String, Color)
Adds a new layer with specified definition to the layer table.
Public methodAddReferenceLayer
Adds a new reference layer with default definition to the layer table. Reference layers are not saved in files.
Public methodAddReferenceLayer(Layer)
Adds a new reference layer with specified definition to the layer table Reference layers are not saved in files.
Public methodClear
Marks all items as deleted.
(Inherited from CommonComponentTableT.)
Public methodDelete(Layer)
Deletes layer.
(Overrides CommonComponentTableTDelete(T).)
Public methodDelete(Int32, Boolean)
Deletes layer.
Public methodDelete(Guid, Boolean)
Deletes layer.
Public methodDelete(Layer, Boolean)
Deletes layer.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodFind(Guid, Boolean)
Finds a layer with a matching ID.
Public methodCode exampleFind(String, Boolean)
Finds the layer with a given name. If multiple layers exist that have the same name, the first match layer index will be returned.

Deleted layers have no name.

Public methodFindByFullPath(String, Boolean)
Public methodFindByFullPath(String, Int32)
Searches for a layer using the fully qualified name, that includes ancestors.

Deleted layers have no name.

Public methodFindId
Uses the guid to find a model component. Deleted objects cannot be found by id. The guid is the value that is stored in the .Id property. In a single document, no two active objects have the same guid. If an object is replaced with a new object, then the guid persists. For example, if the _Move command moves an object, then the moved object inherits its guid from the starting object. If the Copy command copies an object, then the copy gets a new guid. This guid persists through file saving/openning operations. This function will not find grip objects.
(Inherited from CommonComponentTableT.)
Public methodFindIndex
Retrieves a Layer object based on Index. This seach type of search is discouraged. We are moving towards using only IDs for all tables.
Public methodCode exampleFindName(String)
Finds the layer with a given name. If multiple layers exist that have the same name, the first match layer index will be returned.

Deleted layers have no name.

The default layer is NOT included in the search. If required, use the overload with startIndex input.

Public methodFindName(String, Int32)
Finds the next layer that has an index equal or higher than the searched value.

Search in case-insensitive.

Public methodFindNameHash
Finds a Layer given its name hash.
Public methodFindNext
Public methodForceLayerVisible(Guid)
Makes a layer and all of its parent layers visible.
Public methodForceLayerVisible(Int32)
Makes a layer and all of its parent layers visible.
Public methodGetEnumerator
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetSelected
Returns the indices of layers that are selected on the Layer user interface.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodCode exampleGetUnusedLayerName
Gets the next unused layer name used as default when creating new layers.
Public methodCode exampleGetUnusedLayerName(Boolean)
Gets the next unused layer name used as default when creating new layers.
Public methodModify(Layer, Int32, Boolean)
Modifies layer settings.
Public methodModify(Layer, Guid, Boolean)
Modifies layer settings.
Public methodPurge(Int32, Boolean)
Deletes a layer and all geometry objects on a layer
Public methodPurge(Guid, Boolean)
Deletes a layer and all geometry objects on a layer.
Public methodSelect
Selects layers in the Layer user interface.
Public methodSetCurrentLayerIndex
At all times, there is a "current" layer. Unless otherwise specified, new objects are assigned to the current layer. The current layer is never locked, hidden, or deleted.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUndelete
Undeletes a layer that has been deleted by DeleteLayer().
Public methodUndoModify(Int32)
Restores the layer to its previous state, if the layer has been modified and the modification can be undone.
Public methodUndoModify(Guid)
Restores the layer to its previous state, if the layer has been modified and the modification can be undone.
Public methodUndoModify(Int32, UInt32)
Restores the layer to its previous state, if the layer has been modified and the modification can be undone.
Public methodUndoModify(Guid, UInt32)
Restores the layer to its previous state, if the layer has been modified and the modification can be undone.
Top
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.10
See Also