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

Get material, volume, area info for MEP elements using C++ Archicad AddOn

Ankur Yadav
Participant

I am new to Archicad AddOn development. I need to extract the material information and volume area and other information for MEP Elements like ducts, pipes, cables in Archicad. I tried to find some API for MEP elements but couldn't. Need help for proper way to extract these info using C++ APIs. If there is some demo sample provided in Archicad SDK that would also be helpful.

2 REPLIES 2
poco2013
Mentor

MEP elements are just GDL library objects. You extract their parameters the same as any other library object. Use the Library Part example in the sample SDK.

 

Be advised that not all the parameters listed are not necessarily calculated values but are just user fill ins fields. Also note that the A & B length fields are not used and just return one. Any values that are returned will be in metric units.

 

I have created a AddOn that does extract the Library values and prints them to the terminal. I use a Python script to communicate with the AddOn i have attached the same as a example. For Windows OS -- Archicad 26 - Python 3.7 or higher ONLY.

 

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
kuvbur
Enthusiast

You can extract the object's gdl parameters into properties and use formulas to calculate area and everything else. It's also possible to write properties back to gdl parameters - https://github.com/kuvbur/AddOn_SomeStuff/wiki/List-of-possible-commands-in-property-descriptions-(g... 

Structural engineer, developer of free addon for sync GDL param and properties