cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Archicad Python API
About automating tasks in Archicad using the Python API.

Experimental Python add-on is available for Archicad 23

Akos Somorjai
Graphisoft
Graphisoft
Hi folks,

See the blog post on the developer site: https://archicadapi.Graphisoft.com/experimental-python-add-on-for-archicad23

Good luck!

Akos
86 REPLIES 86
runxel
Legend
Since it is not an add-on anymore but built into Archicad I think that GS made quite a commitment, so we hopefully see soon substantial enhancements.
But let's be honest: Right at the moment the stuff you can actually do is quite limited. I remember one example script which deleted all short lines below a certain treshold length, which was great for cleaning lousy DWGs. I was happy to finally see something like that – and hopefully we get that ability back soon.

Also yes, the documentation as it is right now, is pure crap. Looks auto-generated to me. Probably no human at GS has laid their eyes on that For sure no match with let's say the RhinoCommon docs.

Aaand I can't get rid of the feeling that the python stuff is the most unpythonic thing I've ever witnessed. A bit like the Grasshopper connection which was clearly designed by someone who never used Grasshopper for a single minute.
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
poco2013
Mentor
runxel wrote:

Also yes, the documentation as it is right now, is pure crap. Looks auto-generated to me. ...

Aaand I can't get rid of the feeling that the python stuff is the most unpythonic thing I've ever witnessed. ...
The documentation and examples in Python 24 fairly comply with PEP 8 and PEP 25 which should be understood by any Python programmer. That doesn't negate the need to understand Archicad's data structures in the C++ API which are being wrapped by the python classes. (AND YES: some of the documentation is auto generated - That is a Python thing.) That is the problem: Python in Archicad will probably not be used by the professional programmers who will likely stay with C++, but be used by architects and managers who just want to automate some process.

The examples definitely need more comments, keeping in mind their intended users. The key problem is that there just isn't enough functionality now to demo much of substance. As advocates, we, as potential users, would like to to be of assistance, but there just is not much there that would be of interest to any audience now.

In my opinion, Graphisoft needs to upgrade the Python API quickly, before the release of 25, otherwise it may not be able to be overcome its negative reception , as most will just give up on it.That would be unfortunate as the work to date is well designed. This is really a matter of getting Graphisoft's and Nemetschek's management to support it as a program feature and not marketing hype. I see nothing to date that management intends to support and develop the API in a timely manner. I guess that really depends on the large commercial users which are being targeted now, even though the CUs would most benefit?
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
Anonymous
Not applicable
I absolutely agree with your point!
Personally I am an architect, with 6+ yrs of archicad exp. BUT I have some years of web experience (PHP, JS (love it so much, so flexible one), HTML+CS, xml, etc., ActionScript and other Ecmascript realisations) and some Pascal/Delphi and little bit of C from «soviet school». Not to mention the crappy GDL/Basic stuff. Is that usual for an average architect? Not at all. Why I'm learning Python now? Because we need some simple processes automated. We use Grasshopper in our ArchiCAD shop drawings, and I wrote some simple Python for that too. It was helpful, yes. But I am also new to Py and some things just not that straightforward as in JS.

«Auto-generated» is the word!!

I tried to understand the C++ API, but it has too high entering threshold, I just don't have time for it now.
As to make my change markers change their name 1,2,3,... sequentially — which should've been don in 5 lines of code — that's not worth spending a month learning the AC C++ API. I didn't realise that is could be so hard to understand with all my previous background. I need to know C++'s overall structure very well to dive into that crappy graphisoft's C++ api reference. And yes, no support from GS, as I called their Moscow office. Pay us money, that's all we can help you with.

I like our nice webdev docs, they are so clear. Lots of examples. Lots of explanations. So cool. I've used to do some AR in JS. That's a complex thing, but thanks to the clear docs and mighty community I was able to make it.

My points are:
— If you don't know C++ professionally, you can't enter the C++ API dev, as it's too complicated.
— If Graphisoft makes scripting available, they have to make it clear, simple, useful. Make a proper docs. (When I needed to make a script for Adobe InDesign, I just went and did it in a 30 mins time. I could direct any object on a page the way I needed. Nearly the JS+HTML style: change text, chage position, size, etc., address any object directly). I spent a day yesterday to figure out I can do nothing with the text in a text box in ArchiCAD from Py.
— It's all about hype, nothing more. I used to use revit while working in another firm. It's also crappy, but if they do a proper 2d drafting tools — then farewell AC, no regrets.
— The only reason why the practice I work in, still uses AC — is the inertia. It's not that easy to change 60+ work places and the whole pipeline, set in the past 20 years.




poco2013 wrote:
runxel wrote:

Also yes, the documentation as it is right now, is pure crap. Looks auto-generated to me. ...

Aaand I can't get rid of the feeling that the python stuff is the most unpythonic thing I've ever witnessed. ...
The documentation and examples in Python 24 fairly comply with PEP 8 and PEP 25 which should be understood by any Python programmer. That doesn't negate the need to understand Archicad's data structures in the C++ API which are being wrapped by the python classes. (AND YES: some of the documentation is auto generated - That is a Python thing.) That is the problem: Python in Archicad will probably not be used by the professional programmers who will likely stay with C++, but be used by architects and managers who just want to automate some process.

The examples definitely need more comments, keeping in mind their intended users. The key problem is that there just isn't enough functionality now to demo much of substance. As advocates, we, as potential users, would like to to be of assistance, but there just is not much there that would be of interest to any audience now.

In my opinion, Graphisoft needs to upgrade the Python API quickly, before the release of 25, otherwise it may not be able to be overcome its negative reception , as most will just give up on it.That would be unfortunate as the work to date is well designed. This is really a matter of getting Graphisoft's and Nemetschek's management to support it as a program feature and not marketing hype. I see nothing to date that management intends to support and develop the API in a timely manner. I guess that really depends on the large commercial users which are being targeted now, even though the CUs would most benefit?
alexsks
Newcomer
To add to the above, one more voice here for the importance of a scripting language with full capability.

It's crazy that to use a script to access basic Archicad functionality/data the best (and in many cases the only) way for non-professional programmers is from another proprietary software ((Rhino/Grasshopper) which could be considered partly to be a competitor.

I still like Archicad the best from the alternatives, but a serious, professional software in 2020 should have full scripting and a community built around this, I don't think Archicad can do well without it.

Hope Graphisoft gives Python full support and first priority in the next releases.
Anonymous
Not applicable
I am, however, disappointed to hear of a yearly version rollout. I would prefer to see a SLOW, but continuous, rollout (several small additions/year) whereby the users could test each improvement and comment on their usability. This avoids inadvertent “left” turns and may better direct the workflow to the users concerns and their client’s requirements.
arsh_gabbi
Participant

Oh, sorry, I didn't notice you sayng examples of 24... yes, you're right! I meant the 23. The 24 is a huge stepback and surely a great PR solution to make it look like they are more competitive than revit.

Oh, sorry, I didn't notice you sayng examples of 24