Layer Class

Layer definition. Layers are a way to group objects so that the groups can have common formatting. For example, you may want your objects to show up in one color and your dimensions to show in another. Create a separate layer for each, then you can change all the dimensions or all the objects at the same time. You may show or hide layers, change the color, lineweight, or linetype. Layers are utilized often to make drawings easier to read.
Public Class Layer 
Implements IDisposable, _ 
ICloneable, _ 
IEquatable(Of Layer), _ 
IKeyedCollectionDisposableItem(Of Layer)
This language is not supported or no code example is available.
This language is not supported or no code example is available.
Name Description
Protected constructor Layer(Layer)
Public constructor Layer(SerializationInfo, StreamingContext) Constructor for deserializing objects.
Public constructor Layer(string) Name only constructor.
Public constructor Layer(string, Color) Name and color constructor.
Public constructor Layer(string, Color, bool) Name color and visible constructor. Layer's material is created automatically using the provided color.
Public constructor Layer(string, Color, string) Name, color and material constructor.
Public constructor Layer(string, Color, string, float, bool, bool) Name, color, linetype name, line weight, status and locked constructor.
Top
Name Description
Public property Color Gets or sets layer color.
Public property Exportable Gets or sets a value indicating whether the layer (and all the entities belonging to it) are exported by the various Write* classes.
Public property LineTypeName Gets or sets the line type name of the Environment.LineTypes collection. In use only if the LineTypeMethod is byEntity.
Public property LineWeight Gets or sets layer line weight.
Public property Locked Gets or sets a value indicating if the entities on the layer can be selected.
Public property MaterialName Gets or sets layer material.
Public property Name Gets or sets layer name.
Public property Visible Gets or sets layer status (On/Off).
Top
Methods
 
Name Description
Public method Clone() Creates a deep copy of this layer.
Public method ConvertToSurrogate()
Public method Dispose()
Public method Equals(Object) Determines whether the specified object is equal to the current object. (System.Object).
Public method Equals(Layer) Compares layer names ignoring cases.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (inherited from Object).
Public method GetHashCode()
Public method GetKey() Gets the key for the item of the collection.
Public method GetObjectData(SerializationInfo, StreamingContext) Populates a SerializationInfo instance with the data needed to serialize the target object.
Public method GetType Gets the Type of the current instance. (inherited from Object).
Public method GetXElement() For internal use only.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (inherited from Object).
Protected method OnKeyChanged(string, string) When the Name changes I need to notify it to the related keyed collections before changing it.
Public method SetKey(string) Sets the key for the item of the collection.
Public method ToString() Returns a string that represents the current object.
Top
Events
 
Name Description
Public event KeyChanged
Top

.NET Framework

Supported in: 4.5, 4.6, 4.7

In this article

Definition