Returns a list of hotlink instance elements placed from the given hotlink node.
GSErrCode ACAPI_Database ( APIDb_GetHotlinkInstancesID, const API_Guid* hotlinkNodeGuid, GS::Array<API_Guid>* elementRefList );
Parameters
- hotlinkNodeGuid
- [in] the Guid of the hotlink node
- elementRefList
- [out] Guid list of the hotlink instances
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
- any of the parameters is
nullptr
APIERR_BADID
- no hotlink element found by the specified Guid
For other common API errors see the API Errors document.
Remarks
This function retrieves the API_HotlinkType hotlink instance elements of the specified hotlink node.
Example
Int32 allInstancesCounter = 0; Int32 nestedCounter = 0; Int32 hotlinkmoduleCounter = 0; Int32 xrefCounter = 0; GS::Array<API_Guid> nodeRefList; if (ACAPI_Database (APIDb_GetHotlinkNodesID, nullptr, &nodeRefList) == NoError) { for (UIndex iNode = 0; iNode < nodeRefList.GetSize (); iNode++) { GS::Array<API_Guid> elementRefList; if (ACAPI_Database (APIDb_GetHotlinkInstancesID, &nodeRefList[iNode], &elementRefList) == NoError) { for (UIndex iElem = 0; iElem < elementRefList.GetSize (); iElem++) { API_Element element; BNZeroMemory (&element, sizeof (API_Element)); element.header.guid = elementRefList[iElem]; if (ACAPI_Element_Get (&element) == NoError && element.header.type == API_HotlinkID) { allInstancesCounter++; if (element.header.hotlinkGuid != APINULLGuid) nestedCounter++; if (element.hotlink.type == APIHotlink_Module) hotlinkmoduleCounter++; if (element.hotlink.type == APIHotlink_XRef) xrefCounter++; } } } } }
Requirements
- Version: API 12 or later
- Header: APIdefs_Database.h
See Also
API_HotlinkType
APIDb_GetHotlinkNodeID
APIDb_GetHotlinkNodesID
APIDb_GetHotlinkRootNodeGuidID
APIDb_GetHotlinkNodeTreeID
APIDb_GetCompoundInfoStringID
ACAPI_Database
API Functions