2022-04-14 01:35 PM
Hello everyone,
When I have more than one Archicad file open, and I run the python code externally (not in the Python Palette inside Archicad) the code runs on the first file I opened.
How can I run the code in another opened file? Is there a way in python API to list the opened Archicad files, so that I open my python program externally and then choose in which file the python code runs?
best regards
2022-04-14 04:00 PM
Question for Graphisoft: is this due to the same bit of software design that opens a Grasshopper connection on the first AC session opened which may not be the session I want to run the Grasshopper connection in? It sounds eerily similar and both issues need to be fixed.
2022-04-14 05:57 PM
FYI --- For two running instances of Archicad, Archicad will use separate ports,
Set the port for your script manually as in:
conn = ACConnection.connect( 19723 )
I believe ports are assigned serially from 19723 - 19744 but another application could take a port #
2022-04-15 11:37 AM
BTW--- in the Python Palette, if you click on the info icon, it will list the port that the present instance of Archicad is using.