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

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

bschwb
Advocate

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

Bernd Schwarzenbacher
Archicad Add-On Developer
Get (partially free) Add-Ons at www.bschwb.com/add-ons

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!