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

Archicad scripting

Anonymous
Not applicable
Hello everyone,

I used to work with Autocad for many years and now I recently switched to Archicad due to requirements from the office. I used to write a lot of autolisp programs for Autocad and now I would like to start writing scripts for Archicad, but I have no idea where to start. Can anybody help me please?
[list=]
  • I have questions like in which programming language can I write routins.
    Where do I store them
    How can I invoke them
Any help is very much appreciated.

Thank you very much in advance.

Cheers
Sergio
7 REPLIES 7
runxel
Legend
Hello Sergio,
welcome to the world of BIM and Archicad!
You won't regret this, even tho it will be quite a change; the working paradigm is very different to DumbCad.

There is no real equivalent of AutoLisp in Archicad.
Python was recently introduced for real automation. At the moment the possibilities are quite limited, still, since you can retrieve data, but can't modify elements (at least geometrically). Have a look here.
Learning Python is a good decision anyway.

Then there is the big elephant in the room: GDL.
GDL drives a lot of stuff in Archicad, from doors and windows, to curtain wall and stair parts. Also everything regarding accessories, MEP-stuff, smart 2D parts, etc. etc.

GDL might not be the easiest thing to learn, but having some basic knowledge is invaluable.
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
Laszlo Nagy
Community Admin
Community Admin
Sergio,

It would also be helpful to know the type of things you are trying to achieve.
My suspicion is that some of the things you are trying to do cannot be done with GDL as it is a programming language for creating certain types of parametric Archicad elements. For other types of scripting (like macro scripting) GDL is not suitable.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27
Anonymous
Not applicable
Thanks to both of you

In reality, as I was working as an AutiCAD Manager in the previous office, I was always getting some requests from the users, solving the problem by scripting and that was the end of the story. I am pretty sure there are some procedures that can be improved in ArchiCAD, and that was the reason I was asking what and where are located the scripting programs. I want to know what the capabilities in Archicad are.

As soon as I know hat is it possible, I will have more specific ideas.

For the time being I'd like to know how to write a simple "Hello World" program for Archicad.

Cheers and thanks in advance
poco2013
Mentor
Svorgodne wrote:

For the time being I'd like to know how to write a simple "Hello World" program for Archicad.

Cheers and thanks in advance
You may want to look into the developer site for Archicad. Under the Blog tab, there are fairly complete examples of creating Add-ons for Archicad including a Hello World example, a elementary Dialog,and a complete example for creating elements. On the whole the Archicad C++ SDK is mostly complete and i expect it would allow you to to do most of what you might do in Revit. It is, however, very complicated. Archicad does mitigate the process by including a large number of Helper definitions which do simplify the process somewhat. Also take a look at the examples provided with the SDK package. They will mostly cover anything you want to do, but it's up to you to "dig" out the code or find the pertinent parts

Lastly, with the recent introduction of the CMAKE utility, it is now easy to cut/paste example snippets of the demo examples into your AddOn. The documentation is mostly complete but example code is very sparse which makes it necessary to "bounce" back and forth between the function definitions and the demo examples. A very tedious process, But documentation is getting better.

If you are familiar with programming in Revit, you will have no problems with Archicad's SDK.
FYI: the python scripts, for the present do not permit the creation of any elements and are mostly read only and property related. I see nothing in the future to change that attitude. However, if your application is to work only with properties or attributes, then Python is the way to go.

If you find the C++ SDK too complicated, than look into PARM-O or Grasshopper.
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
Anonymous
Not applicable
Hi Poco,

I am sorry... I cannot find the Blog. would you be so kind to paste the link?

Thanks in advance.

Cheers
Viktor Kovacs
Graphisoft
Graphisoft
Here you can find the developer blog, and some other useful things:
https://archicadapi.graphisoft.com/blog
Anonymous
Not applicable
Viktor wrote:
Here you can find the developer blog, and some other useful things:
https://archicadapi.graphisoft.com/blog
Thanks a lot Viktor