License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Archicad C++ API
About Archicad add-on development using the C++ API.

API Module DATA Manager

Anonymous
Not applicable
Hello,

I need help to use API developper kit. I use Visual Studio (on Windows).

My goal :

I aim to write a plugin for archicad 12 which load an external Hotlinked Module and paste it on the scene, like if in Archicad we do : file -> External content -> Place hotlinked Module -> choose Hotlink (module file and select "open in single story mode") and place Module.


My researches :

I found the Module Data Manager module, I think that's what I need to use but I'm not sure.
they speak about an exemple but it's not in the exemple folder of API v12.
I found this exemple in the examples pack for archicad 7 but the API is very old and too many things have changed to build it.



So, if somebody could help me please i really need help because it's difficult to understand how to use this module.

Than you and sorry for my english, i do my best .
10 REPLIES 10
Anonymous
Not applicable
Do I have to use the database so as to past my hotlinkNodeID?

may be something like this :
API_Region          clipRegion;
API_Element         element;
GSErrCode           err;

BNZeroMemory (&clipRegion, sizeof (API_Region));
clipRegion.box.xMin = 0.0;
clipRegion.box.xMax = 2.0;
clipRegion.box.yMin = 1.54;
clipRegion.box.yMax = 2.54;

err = ACAPI_Database (APIDb_StartClippingSessionID, NULL, NULL);
if (err == NoError) {
    /* ... */
    err = ACAPI_Element_Create (&element, NULL);
    /* ... */
    err = ACAPI_Database (APIDb_DoClipID, &clipRegion, NULL);
}
err = ACAPI_Database (APIDb_StopClippingSessionID, NULL, NULL);


i fond it in the documentation.

May be you know how to past un element??