Archicad 24 - Python
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-15
04:45 PM
- last edited on
2021-09-15
11:57 AM
by
Noemi Balogh
2) Here (https://graphisoft.com/downloads/python#try) the example "Excel file import" seems to be wrongly linked as it leads to the Excel file export example when you hit download.
3) Are the Python Snippets from the experimental addon for 23.3000 not supported anymore as I get several traceback errors or might this be a general permiossion issue of my IT system?
Solved! Go to Solution.
- Labels:
-
Automation (Python or JSON)
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-17 03:21 PM
Our Room Report Generator script uses openpyxl PyPI package to import/export Excel files. This is one of the biggest advantages of python, plenty of libraries are available. Our python scripts automatically install the latest version of dependent python packages.
Unfortunately the developers of openpyxl published a new version (3.0.4) which contains a bug. Now we reported this issue to the developers of openpyxl, hopefully they will fix it soon.
So when you ran our room_report.py script and it detected that openpyxl is not installed on your computer, the latest buggy version was installed.
The good news is that you don't have to wait till a new version of openpyxl comes out, because you can downgrade to the previous version (3.0.3):
Open a Command Prompt on Windows or a Terminal on macOS and execute the following commands:
pip3 uninstall openpyxlAfter this first command it will ask for a confirmation, type in y to proceed.
pip3 install -Iv openpyxl==3.0.3In-house at Graphisoft our tests used (and still uses) the previous version of openpyxl (3.0.3), that's the reason why our tests passed and we didn't detect this issue. We have to fix our tests to always use the latest 3rd party libraries.
Thank you very much for reporting us this issue!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-15 06:47 PM
To use Python Palette, switch on the Python Palette Experimental Feature on the Work Environment dialog. The palette can be opened from the Palettes menu.
1. Launch ARCHICAD
2. Go to Options > Work Environment > More Options
3. Under Experimental Features, switch on "Enable Python Palette" checkbox
4. Open the Python Palette from Window > Palettes > Python Palette
[edit:] even if it is activitated, it is still impossible to add the python to an existing or new palette

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-15 07:34 PM
JSN wrote:FYI:
3) Are the Python Snippets from the experimental addon for 23.3000 not supported anymore as I get several traceback errors or might this be a general permiossion issue of my IT system?
The Python Snippets from the experimental version are not supported in the new version in 24. The new version uses a http: interface which can be used either internally in Archicad or completely external with a open Archicah instance.
However, the old experimental snippets can be easily modified to work by just adding the appreciate "connect" commands to open the interface.
A revised (new) excel example is given on the new Python site which will accomplish this.
Do You have any specific questions?
Windows 11 - Visual Studio 2022; ArchiCAD 27
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-16 08:49 AM
TMA_80 wrote:
From the getting started pdf ( it is somhow strange to announce a feature and make it invisible ?!!!) :
To use Python Palette, switch on the Python Palette Experimental Feature on the Work Environment dialog. The palette can be opened from the Palettes menu.
1. Launch ARCHICAD
2. Go to Options > Work Environment > More Options
3. Under Experimental Features, switch on "Enable Python Palette" checkbox
4. Open the Python Palette from Window > Palettes > Python Palette
Yes, that's clear. Now I wanted to put the icon on my customized toolbar. However, this does not work as seen in the screenshot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-16 09:15 AM
poco2013 wrote:- Ah yes thx for pointing this out, I will check this out out by modifying the experimental scripts later.
JSN wrote:FYI:
3) Are the Python Snippets from the experimental addon for 23.3000 not supported anymore as I get several traceback errors or might this be a general permiossion issue of my IT system?
The Python Snippets from the experimental version are not supported in the new version in 24. The new version uses a http: interface which can be used either internally in Archicad or completely external with a open Archicah instance.
However, the old experimental snippets can be easily modified to work by just adding the appreciate "connect" commands to open the interface.
A revised (new) excel example is given on the new Python site which will accomplish this.
https://graphisoft.com/downloads/python
Do You have any specific questions?
- I have found the example page and just wanted to notify that the Excel Import Example download link does not work as expected as it gives me the same file as the previous link for the Excel Export Example and therefore there is no excel_import.py in the folder ....
- Moreover the "Room Data Sheet Export" example throws me back some errors which may or may not related to my system but let me just copy here the error code.
Traceback (most recent call last): File "C:\Test\Room report generator test\room_report.py", line 198, in <module> wbFiller.SaveWorkbook(outputPath) File "C:\Test\Room report generator test\room_report.py", line 116, in SaveWorkbook self._fillWorkbook(workbook) File "C:\Test\Room report generator test\room_report.py", line 169, in _fillWorkbook worksheet = workbook.copy_worksheet(base) File "C:\Program Files\Python37\lib\site-packages\openpyxl\workbook\workbook.py", line 419, in copy_worksheet cp.copy_worksheet() File "C:\Program Files\Python37\lib\site-packages\openpyxl\worksheet\copier.py", line 41, in copy_worksheet self.target.merged_cells = copy(self.source.merged_cells) File "C:\Program Files\Python37\lib\copy.py", line 88, in copy return copier(x) File "C:\Program Files\Python37\lib\site-packages\openpyxl\worksheet\cell_range.py", line 503, in __copy__ n.ranges.append(copy(r)) File "C:\Program Files\Python37\lib\copy.py", line 88, in copy return copier(x) File "C:\Program Files\Python37\lib\site-packages\openpyxl\worksheet\cell_range.py", line 150, in __copy__ title=self.title) TypeError: __init__() got an unexpected keyword argument 'min_col' === Process aborted ===Seems like that it files to write the file, but the "Excel Export" script is workwing flawlessly so I don't think that it is lacking permissions. Maybe someone can tell me more about where to continue investigating. Thx!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-16 10:41 AM
Maybe different versions? I expect Archicad will have to troubleshoot
Windows 11 - Visual Studio 2022; ArchiCAD 27

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-16 10:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-16 12:12 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-17 02:01 PM
Thank you for your question and your enthusiasm with Python!
First, the Excel File Importer link on our website must be incorrect. Here should be the correct link:
Regarding the error with Room Report Generator script, unfortunately, I encounter the same issue! Let me forward this question to our developers for further investigation. As soon as I have an answer, I will let you know!
Thank you very much!
Best regards,
Minh
Minh Nguyen
Technical Support Engineer
GRAPHISOFT

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-17 03:21 PM
Our Room Report Generator script uses openpyxl PyPI package to import/export Excel files. This is one of the biggest advantages of python, plenty of libraries are available. Our python scripts automatically install the latest version of dependent python packages.
Unfortunately the developers of openpyxl published a new version (3.0.4) which contains a bug. Now we reported this issue to the developers of openpyxl, hopefully they will fix it soon.
So when you ran our room_report.py script and it detected that openpyxl is not installed on your computer, the latest buggy version was installed.
The good news is that you don't have to wait till a new version of openpyxl comes out, because you can downgrade to the previous version (3.0.3):
Open a Command Prompt on Windows or a Terminal on macOS and execute the following commands:
pip3 uninstall openpyxlAfter this first command it will ask for a confirmation, type in y to proceed.
pip3 install -Iv openpyxl==3.0.3In-house at Graphisoft our tests used (and still uses) the previous version of openpyxl (3.0.3), that's the reason why our tests passed and we didn't detect this issue. We have to fix our tests to always use the latest 3rd party libraries.
Thank you very much for reporting us this issue!