APIDb_​GetGuidFromDBUnIdID

Returns the GUID from old database identifiers.

    GSErrCode ACAPI_Database (
        APIDb_GetGuidFromDBUnIdID,
        short*      userId,
        UInt32*      databaseId,
        API_Guid*       elemSetId
    );

 

Parameters

userId
[in] First old identifier.
databaseId
[in] Second old identifier.
elemSetId
[out] Unique identifier of the database.

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
One of the parameters is nullptr. Or databaseId is 0.

For other common API errors see the API Errors document.

 

Remarks

This function is used to convert new database identifier guid to the old identifiers.

 

Example

The Environment Control example add-on uses this function to get floor plan’s guid.


API_DatabaseUnId floorPlan;
BNZeroMemory (&floorPlan, sizeof (API_DatabaseUnId));

{
    short userId;
    UInt32 databaseId = 1;
    ACAPI_Database (APIDb_GetGuidFromDBUnIdID, &userId, &databaseId, &floorPlan.elemSetId);
}

 

Requirements

Version: API 18 or later
Header: APIdefs_Database.h

 

See Also

API_DatabaseUnId
APIDb_GetCurrentDatabase, APIDb_GetDBUnIdFromGuidID
ACAPI_Database, API Functions