We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Can I make a composite wall with c++ api?

LeeJaeYoung
Virtuoso

If possible, what example files can I study?

AC27 on window 11
3 REPLIES 3
Joel Buehler
Enthusiast

i did not test it by myselft but i would recommend: 

 

- The Maze Generator Example shows how to create a wall from the ACAPI_Element_GetDefaults

- It is possible to change evrything in a default element with the ACAPI_​Element_​ChangeDefaults API Call

- waht you want to do is maybe burried in the API_Element > API_WallType > API_AttributeIndex composite struct

 

im having allways problems to get all setings from structs right, so that the API does not give me a error back. waht helped me a lot is to print out values. so if i had to do your task, i would start from the maze generator example and start to change the default settings one by one until the wall is the desired composite. i think you also need to write  a function to retrive the composite attribute index of your desired composite. 

Viktor Kovacs
Graphisoft
Graphisoft

What @Joel Buehler proposed is a good starting point, but don't forget to change the modelElemStructureType member to API_CompositeStructure.

LeeJaeYoung
Virtuoso

thank you. ^^
I'll do more study and post more questions.

AC27 on window 11