Returns the list of unique IDs of all detail databases.
GSErrCode ACAPI_Database ( APIDb_GetDetailDatabasesID, API_DatabaseUnId** databaseUnIds, GS::Array<API_DatabaseUnId>* databaseUnIdArray );
Parameters
- databaseUnIds
- [out] The list of detail database unique IDs. Note this is not handle; it’s the address of a pointer. See the example below.
- databaseUnIdArray
- [out] the array of detail databases, in a more recent form. Pass the address of an appropriate GS::Array<> to get the result. This parameter has precedence over the other databaseUnIds parameter.
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
dbUnIDs
isnullptr
APIERR_NOPLAN
- the plan database does not exist
For other common API errors see the API Errors document.
Remarks
This function is used to return the database unique IDs of all detail databases, including independent details as well. Currently this is the only way you can access independent details.
Independent details don’t have a corresponding detail marker on the floor plan or in any of the sections/elevations.
One detail database may belong to many detail markers (i.e. if you place the same marker several times, they will all refer to the same detail database).
You can switch to any of the detail databases by calling the APIDb_ChangeCurrentDatabase function.
Example
The Attribute Manager add-on uses this function to collect all the used attributes from the detail databases.
GS::Array<API_DatabaseUnId> details; GSErrCode err = ACAPI_Database (APIDb_GetDetailDatabasesID, nullptr, &details); if (err == NoError) { // process the information }
Requirements
- Version: API 6.1 or later
- Header: APIdefs_Database.h
See Also
API_DatabaseUnId
APIDb_GetWorksheetDatabasesID, APIDb_GetLayoutDatabasesID, APIDb_GetMasterLayoutDatabasesID, APIDb_ChangeCurrentDatabase
ACAPI_Database, API Functions