Readonly
eventsEvents that can be triggered by the layout manager.
These events allow applications to respond to layout changes.
Fired when the layout is switched
Gets the number of layouts in the layout dictionary.
This includes the Model tab, which is always present.
Optional
db: 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
Optional
db: 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.
Optional
db: AcDbDatabaseInput drawing database to use. Default is the current database.
Finds a layout by name in the database.
Name of the layout to find
Optional
db: 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).
Optional
db: 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.
Optional
db: 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
Optional
db: 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
Optional
db: 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
Optional
db: 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
Optional
db: 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