Creates a new AcDbLayerTableRecord instance.
Optional
attrs: Partial<AcDbLayerTableRecordAttrs>Input attribute values for this layer table record
Optional
defaultAttrs: Partial<AcDbLayerTableRecordAttrs>Default values for attributes of this layer table record
Gets the attributes object for this AcDbObject.
The AcCmObject instance containing all attributes
Gets the database in which this object is resident.
When an object isn't added to a database, this property returns the current working database. After it is added to a database, it will be set automatically. You should never set this value manually.
The database this object belongs to
Sets the database for this object.
This is typically set automatically when the object is added to a database. Manual setting should be avoided unless you know what you're doing.
The database to associate with this object
Gets or sets the description of this layer.
The description of the layer
Gets or sets whether this layer is frozen.
When a layer is frozen, its entities are not displayed and cannot be modified.
True if the layer is frozen, false otherwise
Gets or sets whether this layer is hidden.
When a layer is hidden, it isn't shown in the user interface of the host application, but entities on the layer are still displayed.
True if the layer is hidden, false otherwise
Gets or sets whether this layer is in use.
A layer is considered in use if it contains entities or is referenced by other objects in the drawing.
True if the layer is in use, false otherwise
Gets or sets whether this layer is locked.
When a layer is locked, its entities cannot be modified but are still visible.
True if the layer is locked, false otherwise
Gets or sets whether this layer is turned off.
When a layer is turned off, its entities are not displayed but can still be modified.
True if the layer is turned off, false otherwise
Gets or sets whether this layer is plottable.
When a layer is plottable, its entities will be included when the drawing is plotted or printed.
True if the layer is plottable, false otherwise
Gets or sets the linetype name for this layer.
The linetype defines the pattern of dashes, dots, and spaces used to display lines and curves on this layer.
The linetype name
Gets or sets the line weight for this layer.
Line weight determines the thickness of lines and curves on this layer.
The line weight value
Gets or sets the material ID associated with this layer.
Material IDs are used for rendering and visualization purposes.
The material ID
Gets or sets the name of the symbol table record.
This property corresponds to DXF group code 2 and is used for identifying and referencing the symbol table record.
The name of the symbol table record
Gets the object ID.
AutoCAD uses 64-bit integers to represent handles, which exceed the maximum integer value of JavaScript. Therefore, strings are used to represent object handles.
The object ID as a string
Sets the object ID.
The new object ID
Gets the object ID of the owner of this object.
The owner object ID
Sets the object ID of the owner of this object.
The new owner object ID
Gets or sets the standard flags for this layer.
Standard flags are bit-coded values:
The standard flags value
Gets or sets the transparency level of this layer.
Transparency values range from 0 (opaque) to 1 (fully transparent).
The transparency level (0-1)
Gets the value of the specified attribute.
This method will throw an exception if the specified attribute doesn't exist. Use getAttrWithoutException() if you want to handle missing attributes gracefully.
The name of the attribute to retrieve
The value of the specified attribute
Gets the value of the specified attribute without throwing an exception.
This method returns undefined if the specified attribute doesn't exist, making it safer for optional attributes.
The name of the attribute to retrieve
The value of the specified attribute, or undefined if it doesn't exist
Sets the value of an attribute.
The name of the attribute to set
Optional
val: AcDbLayerTableRecordAttrs[A]The value to assign to the attribute
Represents a record in the layer table.
This class contains information about a layer in the drawing database, including color, visibility settings, linetype, and other layer properties. Layers are used to organize and control the display of entities in the drawing.
Example