Click or drag to resize

LayerTable Methods

The LayerTable type exposes the following members.

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 methodAddPath(String)
Adds all of the layer in the specified layer path, beginning with the root. Layer paths contain one or more valid layers names, with each name separated by NamePathSeparator. For example, "Grandfather::Father::Son".
Public methodAddPath(String, Color)
Adds all of the layer in the specified layer path, beginning with the root. Layer paths contain one or more valid layers names, with each name separated by NamePathSeparator. For example, "Grandfather::Father::Son".
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 methodCreateLayer
Basic tool used by the add layer methods.
Public methodDelete(Layer)
Deletes layer.
(Overrides CommonComponentTableTDelete(T).)
Public methodDelete(Guid, Boolean)
Deletes layer.
Public methodDelete(IEnumerableInt32, Boolean)
Deletes layers.
Public methodDelete(Int32, Boolean)
Deletes layer.
Public methodDelete(Layer, Boolean)
Deletes layer.
Public methodDuplicate(IEnumerableInt32, Boolean, Boolean)
Duplicates, or copies, one or more layers. Duplicated layers are added to the document.
Public methodDuplicate(Int32, Boolean, Boolean)
Duplicates, or copies, a layer. Duplicated layers are added to the document.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodFindByFullPath
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/opening operations. This function will not find grip objects.
(Inherited from CommonComponentTableT.)
Public methodFindIndex
Retrieves a Layer object based on Index. This search 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 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 (Overrides CommonComponentTableTGetEnumerator.)
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 methodGetSorted
Gets an array of layer indices that are sorted by the values of SortIndex.
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) Obsolete.
Gets the next unused layer name used as default when creating new layers.
Public methodModify(Layer, Guid, Boolean)
Modifies layer settings.
Public methodModify(Layer, Int32, Boolean)
Modifies layer settings.
Public methodPurge(Guid, Boolean)
Deletes a layer and all geometry objects on a layer.
Public methodPurge(Int32, 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 methodSort
Updates the layer sort order
Public methodSortByLayerName
Sort layers, in the layer table, by their name in either ascending or descending order. This function sorts layers in the same manner as Rhino's Layers panel.
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(Guid)
Restores the layer to its previous state, if the layer has been modified and the modification can be undone.
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, UInt32)
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.
Top
See Also