Got a minute? We appreciate your feedback:

Graphisoft Learn survey
Archicad Python API
About automating tasks in Archicad using the Python API.

Exactly what can you do with Python?

Jim Allen
Expert

One wish I have had with Archicad since I moved from Vectorworks several years ago, is the ability to rotate stuff (objects, geometry etc) 90 degrees with a single keystroke shortcut.

 

It's amazing how much time a little shortcut like this can save. Almost every time I use Archicad, I rotate things 90 degrees or more. Instead of Command-E, click to place the protractor, click to define the starting angle, and click to define the rotation angle, it could just be a single keystroke, or two for 180 degrees.

 

When I first learned about the Python connection, this is the first thing I thought might be possible to implement.

 

My son is good with Python and I thought i might ask him to see if he could do it, because it doesn't sound complicated.

 

Then reading through the posts on the subject here, it seems like it might be a lot more complicated than I thought.

 

The Python palette runs the scripts, which is fine, but it doesn't appear that they can be triggered with keystrokes, which pretty much rules out what I wanted.

 

There is quite a lot of documentation with sample scripts, and there are quite a few videos. It seems good for interrogating the model and running reports, but what else?

 

The question I didn't find an answer to, is exactly what can you use Python for? 

 

I read the Getting Started documentation, but this wasn't at all helpful, and that's being really tactful! There was no summary overview which I would have thought was an obvious thing to have.

 

What I would also have liked to have seen was some kind of centralised facility for people to share their Python scripts. That would be great! Nope - couldn't find that either. There are just 9 demo scripts on the Graphisoft site, not exactly overwhelming.

 

So just for the Edwin Starr fans, Python in Archicad, huh - what is it good for? 

 

 

Archicad 27 UKI | OS X 12.7.1 Monterey
6 REPLIES 6

BenjiDev
Enthusiast

I am not even sure you can register key strokes to run some functionality in  a C++ Addon in a simple way...  But I probably missed something in the docs.

 

EDIT: Nevermind, it is actually quite simple at least from a C++ addon. 

I even made a small addon that i think does what you want. You can rotate an element clockwise or anti-clockwise 90 degrees with custom key strokes. Not really answering your question sorry but I can share it with you if you are interseted. 

 

Just wanted to thank you for the rotation add-on - I wrote something like this for myself when I was still in AutoCAD and it saved me thousands of clicks.

 

From what I can see, the JSON / Python api is mainly capable of reading various properties from the model, setting properties, and automating the creation of layouts, views, etc. Not much help to manipulate the model itself or add construction elements. You CAN, however, call functions from an Add-In. I did find this add-in which adds several commands to the JSON/Python api, one being to move an element:

https://github.com/tlorantfy/archicad-additional-json-commands

 

It is the year 2023 AD - Archicad should be much easier to script. You only need to look at the Sketchup / Blender / Rhino / Grasshopper ecosystem to see how much creativity and work a community can contribute to any software project. I don't understand how the Archicad devs themselves have tolerated developing library objects for so many years with such a horrible GDL environment. If GS can't avail itself of the community's help, then the company is going to fall behind pretty quickly.

 

BenjiDev
Enthusiast

Glad that you like the add-on, hope it helps you out. 

I'd like to add another thing to graphisofts backlog: a centralized app-store for add-ons. 

Now you have to set up your own website which takes some time and effort (like i did for example). The total time saved will be big if each developer does not have to set up their own personal "app-store". 

Oh definitely - yes please! Sorry for the late response, must have missed the original notification.

 

[Edit: found it in your sig, but it looks like it's Windows only...]

Archicad 27 UKI | OS X 12.7.1 Monterey

BenjiDev
Enthusiast

Yeah only available to windows as I don't have access to a macbook (as far as I know you need one to develop for it). Probably will get one in the foreseeable future.

Mac Mini - really cheap now on eBay if you go for an M1, and older ones are selling for silly prices.

Archicad 27 UKI | OS X 12.7.1 Monterey

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!