Creates a new AcDbBlockTableRecord instance.
Static
MODEL_Name constant for model space block table record
Static
PAPER_Name prefix for paper space block table records
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
Returns true if this is a model space block table record.
Model space is the primary drawing area where most entities are created.
True if this is a model space block table record
Returns true if this is a paper space block table record.
Paper space is used for creating layouts for printing and plotting.
True if this is a paper space block table record
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 or sets the base point of the block in WCS coordinates.
This point is the origin of the MCS (Model Coordinate System), which is the local WCS for the entities within the block table record.
The origin point of the block
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
Appends the specified entity to this block table record.
This method adds an entity to the block and sets up the necessary relationships between the entity and the block table record.
The entity to append to this block table record
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
Searches for an entity in this block table record with the specified ID.
The entity ID to search for
The entity with the specified ID, or undefined if not found
Creates an iterator object that can be used to iterate over the entities in the block table record.
An iterator object that can be used to iterate over the entities
Sets the value of an attribute.
The name of the attribute to set
Optional
val: AcDbSymbolTableRecordAttrs[A]The value to assign to the attribute
Block table record that serves as a container for entities within drawing databases.
Block table records (BTRs) are used to organize and group entities together. There are two special BTRs that are always present in every database:
Each block table record has an origin point and can contain multiple entities.
Example