Returns the drawing extent of the current database.
GSErrCode ACAPI_Database ( APIDb_GetExtentID, API_Box* extent, const API_DatabaseUnId* databaseUnId );
Parameters
- extent
- the extent box
- databaseUnId
- optional parameter; if
nullptr
then the extent box is returned for the current database taking into consideration only the visible elements. If a valid database unique ID is given, then the bounding box of that database is returned, including hidden elements.
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
extent
isnullptr
APIERR_NOPLAN
- no open project
For other common API errors see the API Errors document.
Remarks
This function is used to get the drawing extent of the actual database. The extent depends on different settings (hidden layers, actual story etc.), always returns the region would be shown in case of a “Fit in Window” command.
Requirements
- Version: API 4.1 or later
- Header: APIdefs_Database.h