2022-09-07 06:55 PM
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?
2022-09-09 05:23 PM - edited 2022-09-22 11:40 PM
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.
2023-02-27 08:25 PM - edited 2023-02-27 08:27 PM
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:
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.
2023-03-01 12:24 PM
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".
2023-03-01 01:16 PM - edited 2023-03-01 01:20 PM
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...]
2023-03-06 01:41 PM
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.
2023-03-07 10:57 AM
Mac Mini - really cheap now on eBay if you go for an M1, and older ones are selling for silly prices.