We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-01-19 12:57 AM - last edited on 2024-09-26 12:17 PM by Doreena Deng
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