APIDb_​CreateHotlinkNodeID

Creates a hotlink node without updating its cache content.

    GSErrCode ACAPI_Database (
        APIDb_CreateHotlinkNodeID,
        API_HotlinkNode*     hotlinkNode
    );

 

Parameters

hotlinkNode
[in/out] the hotlink node to be created

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
hotlinkNode parameter is nullptr, or sourceLocation is nullptr or invalid.

For other common API errors see the API Errors document.

 

Remarks

This function is used to add a new hotlink node to the project.

The hotlink can be either APIHotlink_Module or APIHotlink_XRef type A valid sourceLocation must be specified. On success the Guid of the new hotlink node returns in the guid field of the hotlinkNode parameter.

Creating a hotlink node does not make the hotlinked content appear in the project. This simply creates a reference to the source module file, and prepares a cache which contains the elements and attributes as an image of the original source. In order to place a hotlink instance on the plan, you need to create an API_HotlinkType element referring to this hotlink node with the appropriate hotlinkNodeGuid identifier.

Note that XRefs are handled by the DXF/DWG add-on, and the format of their userdata is not published.

This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.

 

Requirements

Version: API 12 or later
Header: APIdefs_Database.h

 

See Also

API_HotlinkNode
APIDb_GetHotlinkNodeID
APIDb_ModifyHotlinkNodeID
APIDb_DeleteHotlinkNodeID
APIDb_BreakHotlinkNodeID
ACAPI_Database
API Functions