cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

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

Python API Input "Locked Out"

poco2013
Mentor

I am trying to write a independent and/or a associative labile to a plan via the Python ExecuteAddOnCommand interface. I simply reference the sample CreateLabel( )  and CreateLabel_Associative( ) functions demoed in the Element)Test example code. These functions work perfectly from the Test menu in the plan. But if I reference the same functions through the Python script, the function outputs are ignored and no action is taken and no error is raised. 

 

I am told by Graphisoft API technical support that the C++ API will now ignore any inputs from a Python script while Python is active. Pre-selecting a object will circumvent this limitation and will allow other functions to operate and return data. But this is not possible, in this case, since a "click point" is necessary here. 

 

 I am not sure this is correct since i was able to create and place labels and symbols through the same interface in previous releases. It is true that while Python is active, you can not manually select a element, or if a dialog is open, it will prevent a python script from executing. but i have never had a problem programmatically selecting and modifying a element.

 

IAE, does anyone know of a workaround to resolve this problem? If this is true, it effectively deprecates the Python API.

Using Windows 11, API 27.3001, Python 3.11

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
0 REPLIES 0