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 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 (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 methodFind(Guid, Boolean, Int32)
Finds a layer with a matching ID.
Public methodFind(Guid, String, Boolean) Obsolete.
Finds a layer with a given name and matching parent ID.
Public methodFind(Guid, String, Int32)
Finds a layer with a given name and matching parent ID.
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(Int32, String)
Use FindName(name, index).
Public methodFindNext(Int32, String, Boolean)
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 (Inherited from Object.)
Public methodGetSelected
Returns the indices of layers that are selected on the Layer user interface.
Public methodGetType (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 (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
See Also