Creates a new AcDbDictionary instance.
The database this dictionary belongs to
Protected
_recordsMap of records indexed by object ID
Protected
_recordsMap of records indexed by name
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 the maximum tab order value of layouts in the layout dictionary.
The maximum tab order value, or -1 if no layouts exist
Gets the number of entries in the dictionary.
The number of entries in the dictionary
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 the object with the specified name from the dictionary.
Name of the object to retrieve
The object with the specified name, or undefined if not found
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 the dictionary for a layout associated with the specified block table record ID.
The block table record ID to search for
The layout associated with the block table record ID, or undefined if not found
Gets the object with the specified ID from the dictionary.
ID of the object to retrieve
The object with the specified ID, or undefined if not found
Creates a new iterator for traversing the dictionary entries.
A new AcDbObjectIterator for this dictionary
Adds a new entry to the dictionary.
If an entry with the specified key already exists, the existing entry is erased and replaced with the new one.
String representing the object's search key name
The new object to add to the dictionary
Sets the value of an attribute.
The name of the attribute to set
Optional
val: AcDbObjectAttrs[A]The value to assign to the attribute
Dictionary for storing and managing AcDbLayout objects.
This class extends AcDbDictionary to provide specialized functionality for managing layout objects, including searching by block table record ID and tracking the maximum tab order.
Example