Archicad Python API
About automating tasks in Archicad using the Python API.

Python Implimentation in 24

poco2013
Mentor
FYI:
For those of us who enthusiastically participated in the initial python beta in Archicad and were then “locked out” of the actual implementation beta in 24, I would like to hear an update of where we are going?

I ask this because Graphisoft has publicly posted the current Python schema on PyPi (as promised) and there seems to be, at present, some serious limitations in its application.
I recognize that beta testers cannot talk about this but the schema has been publicly posted without restrictions and I don’t like the direction taken, at present.

Let me explain. According to the PyPi posting, the schema has been completely changed from the first beta – FOR THE BETTER (GOOD NEWS). Addressing of properties and associated objects is now straight forward and extremely easy to understand and accomplish.

However, removed, at present, is any ability to create even the limited objects available in the first beta, such as, walls, zones, arcs, drawings, or text. There still is no ability to address the underlying data structures of elements such as ‘memo’, quantities, Libparms, or substructures, etc.

Since the PyPi page indicates they are now on the third beta, I assume they are well advanced and they may be close to the final product. My opinion is that restricting the usage of Python to manly property access is too restrictive to be of much value. Keep in mind that the present usage of properties, expressions in combination with Excel mostly negates the need for the Python experiment as is presently proposed.

Graphisoft has proposed gradual expansion of Python with each new release, but if this is the proposed start, it may be 10 -20 years before being viable? I doubt that this initial experiment will generate much interest or use. As always, in the case of “the chicken or the egg”, limited usage will discourage further investment of resources. In short, we may never reach the target. Graphisoft will simply miss out on a unique opportunity to leap other competitors, and we will all then miss out.

I would like to hear other comments on this puzzling development. Does Graphisoft intend to draw out the implementation of Python as a marketing “strategy”? Seems contrary to ”getting a bigger market share”?
Hopefully, Graphisoft will open a Python sub-topic on this forum to discuss these issues. It would be interesting to hear from Graphisoft’s management and to hear your comments, if anyone is even interested.
Perhaps there isn’t sufficient interest and Python will just go the way of ‘List schedules’ and ‘Wall framing’?? – (again, Chicken or Egg)

“One Step Forward and Two Back” for now.
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
3 REPLIES 3
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi Gerry,

Let me summarize the most important information related to the new API, which is available from AC24 Beta3:
  • The communication happens via HTTP using JSON messages. Because JSON is a language-independent data format, you can use any programming language to send commands to ARCHICAD.
  • GRAPHISOFT publishes an official Python binding for the ARCHICAD JSON Interface at the Python Package Index (PyPI): https://pypi.org/project/archicad
    • This package (so called Python API) helps to establish the connection and hides the JSON communication layer. It requires Python 3.7 or later.
    • Only Python and the archicad pip package have to be installed, nothing else is needed. Simply run your python script from outside ARCHICAD. Or if you want to run scripts inside ARCHICAD, then switch on the Python Palette from Work Environment, but that's optional only, you can use the Python API without that palette also.
  • You can find the currently available commands in this documentation.
The previous versions (AC22 and AC23 Python API) were experimental versions, we published those to collect your feedbacks. The new version (which is available from AC24 Beta3) is not an experiment anymore.
Based on your feedbacks the most painful points of the experimental version were the followings:
  • complicated installation process
  • the lack of ability to debug your script
  • must use strictly defined python version
  • not free to use any python module (pypi packages)
  • only few functions are available
Except the last one, all of these have been solved in this version. You are right, currently less features are available than in the experimental version, but it’s just a matter of time
Anonymous
Not applicable
Does this mean that all of the function will be available in Python API at AC24?
Is there a release date?
akomporday
Graphisoft Alumni
Graphisoft Alumni
Hey,
No, the new Python API will start with a different set of functions than the experimental API, and a smaller one than the c++ one. But we will implement new ones continuously so more and more things will be available from the Python package.