The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (API DevKit) for independent software developers

Moderators: Barry Kelly, Karl Ottenstein, LaszloNagy, ejrolon, gkmethy, Tibor Lorántfy, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik

User avatar
By ReignBough
When I change the layer of railing element (AC21) using ACAPI_Element_Change() funtion, the railing changes its appearance. My code:

API_Element elem, mask;
BNZeroMemory(&elem, API_ElementSize);
ACAPI_ELEMENT_MASK_SET(mask, API_Elem_Head, layer);
elem.header.guid = /*railing element guid*/;
err = ACAPI_Element_Get(&elem);
elem.header.layer = /*new layer index*/;
err = ACAPI_Element_Change(&elem, &mask, NULL, NULL, true);
railing layer change.png
Before and after layer change through API.