ReadonlyeventsEvents that can be triggered by the layout manager.
These events allow applications to respond to layout changes.
Fired when the layout is created
Fired when the layout is removed
Fired when the layout is renamed
Fired when the layout is switched
Gets the number of layouts in the layout dictionary.
This includes the Model tab, which is always present.
Optionaldb: AcDbDatabaseDrawing database to use (defaults to the current database)
The number of layouts in the dictionary
Create a new AcDbLayout object given a unique layout name.
Input name to give new AcDbLayout object
Optionaldb: AcDbDatabaseInput drawing database to use. Default is the current database.
Return newly created layout and its associated block table record.
Delete the layout named 'name' from the database 'db' (or the workingDatabase if 'db' isn't provided).
Input name of layout to delete.
Optionaldb: AcDbDatabaseInput drawing database to use. Default is the current database.
Finds a layout by name in the database.
Name of the layout to find
Optionaldb: AcDbDatabaseDrawing database to use (defaults to the current database)
The layout object, or undefined if not found
Get active layout in the database 'db' (or the workingDatabase if 'db' isn't provided).
Optionaldb: AcDbDatabaseInput drawing database to use. Default is the current database.
Return active layout if found. Otherwise, return undefined.
Return true if the layout named 'name' is found in the database 'db' (or the workingDatabase if 'db' isn't provided).
Input name of layout to find.
Optionaldb: AcDbDatabaseInput drawing database to use. Default is the current database.
Return true if the layout named name is found in the database 'db' (or the workingDatabase if 'db' isn't provided).
Renames a layout in the database.
Current name of the layout to rename
New name for the layout
Optionaldb: AcDbDatabaseDrawing database to use (defaults to the current database)
True if the layout was renamed successfully, false otherwise
Sets the layout named 'name' as the current layout in the database.
Name of the layout to make current
Optionaldb: AcDbDatabaseDrawing database to use (defaults to the current database)
True if setting the current layout was successful, false otherwise
Makes the layout object associated with the given block table record ID the current layout.
Block table record ID for the layout object to make current
Optionaldb: AcDbDatabaseDrawing database to use (defaults to the current database)
True if setting the current layout was successful, false otherwise
Makes the layout object associated with the given object ID the current layout.
Object ID for the layout object to make current
Optionaldb: AcDbDatabaseDrawing database to use (defaults to the current database)
True if setting the current layout was successful, false otherwise
Manages layout objects in a drawing database.
This class provides functionality for managing layouts, including creating, finding, renaming, and switching between layouts. It also provides event notifications when layouts are switched.
Example