Archicad 28 C++ API
Loading...
Searching...
No Matches
API_HotlinkCacheGenerator Class Referenceabstract

Base class for generating the updated content of a hotlink cache. More...

#include <APIdefs_Database.h>

Public Member Functions

virtual GSErrCode GenerateCacheContentForHotlinkNode (const API_Guid &hotlinkNodeGuid)=0
 A callback function to generate the cache content for hotlink nodes.
 

Detailed Description

Base class for generating the updated content of a hotlink cache.

Remarks
When a hotlink node is created by the add-on, the content of the hotlink cache must be generated also. In order to create the appropriate elements and attributes into the cache database, you need to pass an API_HotlinkCacheGenerator object to the ACAPI_Hotlink_UpdateHotlinkCache function. When the GenerateCacheContentForHotlinkNode method of the object is called back from the hotlink update function, the standard element and attribute creator functions (like ACAPI_Element_Create and ACAPI_Attribute_Create) are redirected to create elements and attributes into the hotlink cache database, rather than the project database.
If the GenerateCacheContentForHotlinkNode function return an error, the update process is canceled.
Example
See the examples section of API_HotlinkCacheGenerator
. Further hotlink-related code samples can be found in the Element_Test
example add-on.

Member Function Documentation

◆ GenerateCacheContentForHotlinkNode()

virtual GSErrCode API_HotlinkCacheGenerator::GenerateCacheContentForHotlinkNode ( const API_Guid hotlinkNodeGuid)
pure virtual

A callback function to generate the cache content for hotlink nodes.

Parameters
hotlinkNodeGuidGuid of the hotlink node.
Returns
Returns error code.