Returns the list of unique IDs of all detail databases.
GSErrCode ACAPI_Database ( APIDb_GetWorksheetDatabasesID, API_DatabaseUnId** databaseUnIds, GS::Array<API_DatabaseUnId>* databaseUnIdArray );
Parameters
- databaseUnIds
- [out] The list of worksheet database unique IDs. Note this is not handle; it’s the address of a pointer. See the example below.
- databaseUnIdArray
- [out] the array of worksheet 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 worksheets databases, including independent details as well. Currently this is the only way you can access independent details.
[Independent worksheets don’t have a corresponding detail marker on the floor plan or in any of the sections/elevations.???]
[One worksheet database may belong to many worksheet markers (i.e. if you place the same marker several times, they will all refer to the same worksheet database).???]
You can switch to any of the worksheet 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> worksheets; GSErrCode err = ACAPI_Database (APIDb_GetWorksheetDatabasesID, nullptr, &worksheets); if (err == NoError) { // process the information }
Requirements
- Version: API 6.1 or later
- Header: APIdefs_Database.h
See Also
API_DatabaseUnId
APIDb_GetDetailDatabasesID, APIDb_GetLayoutDatabasesID, APIDb_GetMasterLayoutDatabasesID, APIDb_ChangeCurrentDatabase
ACAPI_Database, API Functions