Service alert: BIMcloud SaaS disruption in the US Read more

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

Update doors' properties

Emkave
Enthusiast

Good day everybody. I have stuck with an issue with updating doors' parameters.

Traditionally I update elements' properties by changing their memos and execute the functions in this order:

 

ACAPI_Element_GetMemo(element.header.guid, &memo, API_DoorID);

ACAPI_ELEMENT_MASK_CLEAR(mask);
ACAPI_ELEMENT_MASK_SET(mask, API_DoorType, openingBase.libInd);

<changing memo's values>

and finally I apply the change:

ACAPI_Element_Change(&element, &mask, &memo, APIMemoMask_AddPars, true);

However, the changes are not applied for some reason.

How do you update doors' parameters without creating a new door and deleting the old door and placing the new door on place of the old?


Thanks to all in advance for the help!

2 REPLIES 2
LChen
Graphisoft
Graphisoft

Hi, The problem may happens when gdl script doesn't executed again after parameters changed. I'd suggest you to use the following commands which can force AC to run gdl script with the updated values:

err = ACAPI_LibraryPart_OpenParameters(&paramOwner);
err = ACAPI_LibraryPart_ChangeAParameter(&chgParam);
err = ACAPI_LibraryPart_GetActParameters(&getParams);
ACAPI_LibraryPart_CloseParameters();
You can find sample code in API Examples code (LibPart_Test.cpp).
HTH.

thank you for the proposal, however that did not resolve the issue. 
I found however other thing that if I change parameters A, B or ZZYXZ - the changes are being seen. However, I am still unsure why when changing door parameters such as width, length and height does not do anything to it. All other elements like windows, objects and so on are affected by such change, except for doors.