Archicad C++ API
About Archicad add-on development using the C++ API.

GSErrCode ACAPI_Goodies ( APIAny_RunGDLParScript

Anonymous
Not applicable
Hi - I am trying to issue the following command from my C++ plugin:

GSErrCode ACAPI_Goodies (
APIAny_RunGDLParScriptID,
API_Elem_Head* elemHead,
UInt32 mask
);


My element is an Object, so the code is:
						BNZeroMemory(&tElem2, sizeof(tElem2));
						tElem2.header.guid = GSGuid2APIGuid(element.GetElemGuid());
						GSErrCode err = ACAPI_Goodies(APIAny_RunGDLParScriptID, &tElem2.header, (void*)APIElemMask_FromFloorplan);
However this function is returning error code returned is 0x8106006a. Does anyone know why this would be pls?

Thanks

Paul
2 REPLIES 2
Akos Somorjai
Graphisoft
Graphisoft
paulk wrote:
Hi - I am trying to issue the following command from my C++ plugin:

GSErrCode ACAPI_Goodies (
APIAny_RunGDLParScriptID,
API_Elem_Head* elemHead,
UInt32 mask
);


My element is an Object, so the code is:
						BNZeroMemory(&tElem2, sizeof(tElem2));
						tElem2.header.guid = GSGuid2APIGuid(element.GetElemGuid());
						GSErrCode err = ACAPI_Goodies(APIAny_RunGDLParScriptID, &tElem2.header, (void*)APIElemMask_FromFloorplan);
However this function is returning error code returned is 0x8106006a. Does anyone know why this would be pls?

Thanks

Paul
Hi Paul,

That error code means APIERR_BADDATABASE: that API call can be executed only if any of the 2D window is in front.

Best, Ákos
Anonymous
Not applicable
Thanks Akos - that resolved my issue.

Paul