License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Archicad C++ API
About Archicad add-on development using the C++ API.

How to set a material on an object.

itono
Contributor

hi,

 

I am a c++ beginner investigating Archicad APIs.

 

Is it possible to use Archicad's API to reflect materials on objects (walls and doors) displayed in the project?

If possible, are functions or sample code available in the development kit?

 

itono,

1 REPLY 1

Hi Itono,

 

Yes you can read and set the building material of elements with the API. The API DevKit includes and example directory. Check the example "Element_Test" for changing/reading/creation of elements. Specifically in "Element_Test\Src\Element_Modify_ChangeParameters.cpp" there are a few lines where the buildingMaterial of a hatch is changed.

For walls it's very similar to that example. For details check the documentation of the wall element type here: https://archicadapi.Graphisoft.com/documentation/api_walltype.

For doors/windows it's a bit more difficult, since you need to change the corresponding GDL parameters. For an intro to that, check out the example "LibPart_Test".

Hope that gives you a first starting point to look into!

Best,
Bernd