cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Streamline your workflows and master BIM coordination! Program starts April 28!

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!

1 REPLY 1
LChen
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.