2023-04-16 01:04 AM - last edited on 2023-05-31 10:22 AM by Laszlo Simon
Hi everyone!
So I have this one-file python script which connects to opened archicad 26 project, gets info about certain elements and writes it into a json file.
The question is, how can "convert" this python script into a archicad add-on? Should I put it in add-ons folder? If yes, to which file type should I convert this?
The idea of the whole thing is that i want to use the same add-on from any project on my device, so it will run the script with a press of a button in archicad.
Thanks in advance!
Solved! Go to Solution.
2023-04-16 04:07 AM
A Python script is NOT a AddOn. Nor can it be converted to a AddOn. A C++ AddOn is a complied DLL with the extension "apx" There is no way to run a Python script from a button in Archicad. That feature is not offered (YET). In Archicad, You must run a Python script from the Python Palette.
You can run a script external to Archicad (assuming Archicad is running) by using a IDE or a bat file shortcut or , as i use, a pushbutton in a StreamDeck device which is configured to a bat file or directly to Python..
2023-04-17 03:07 AM
It is not possible to use .NET in Archicad. .NET is mostly for the Window OS usage although Microsoft contents otherwise. AFASIK, there have been some requests to add it to the API, as Graphisoft said they are now exploring other languages. --- As in more user common. Just what we need --- six languages in Archicad. My guess (ONLY) is that if they did incorporate .NET, it would run on top on the C++ API as a alternative to Python, I don't see any advantage.
2023-04-17 07:53 PM
C++.
Different versions of ArchiCAD require different versions of Visual Studio.
Also required:
- - getting a Graphisoft developer ID.
- - downloading the ArchiCAD version specific API
- - more info found here: https://archicadapi.graphisoft.com/
- Chris
2023-04-16 04:07 AM
A Python script is NOT a AddOn. Nor can it be converted to a AddOn. A C++ AddOn is a complied DLL with the extension "apx" There is no way to run a Python script from a button in Archicad. That feature is not offered (YET). In Archicad, You must run a Python script from the Python Palette.
You can run a script external to Archicad (assuming Archicad is running) by using a IDE or a bat file shortcut or , as i use, a pushbutton in a StreamDeck device which is configured to a bat file or directly to Python..
2023-04-16 11:59 PM
Thank you for your response! And while you're here, is it possible to do this on any .NET running language or only c++ and will this feature be added for python in near future?
2023-04-17 03:07 AM
It is not possible to use .NET in Archicad. .NET is mostly for the Window OS usage although Microsoft contents otherwise. AFASIK, there have been some requests to add it to the API, as Graphisoft said they are now exploring other languages. --- As in more user common. Just what we need --- six languages in Archicad. My guess (ONLY) is that if they did incorporate .NET, it would run on top on the C++ API as a alternative to Python, I don't see any advantage.
2023-04-17 07:08 PM
And another question, in which languages I can create add-ons?
2023-04-17 07:53 PM
C++.
Different versions of ArchiCAD require different versions of Visual Studio.
Also required:
- - getting a Graphisoft developer ID.
- - downloading the ArchiCAD version specific API
- - more info found here: https://archicadapi.graphisoft.com/
- Chris
2023-08-02 05:30 AM
Hi MudratDetector,
Do you know how much time it takes to get Graphisoft developer ID?
I sent an email 10 days ago but till now still no reply email.
Thank you, and I really hope to receive your response soon.
2023-08-02 06:18 PM - edited 2023-08-02 06:19 PM
Seems like it only took a few days, maybe a week. I received my 'offifial credentials' five or so years ago and do not recall exactly. Have you checked your Spam folder for the reply? 10 days seems like a long time.
- chris