Python Add-On Command Handler Error

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-07-13
04:40 AM
- last edited on
2024-09-26
12:21 PM
by
Doreena Deng
2021-07-13
04:40 AM
I am trying to create a application which inputs parameters from a Python dialog to configure and place a Library Part. When I call the Python application internal to Archicad the program "hangs" at the point of library part placement. When I then exit the Python dialog, the part is placed If i call the Python dialog externally via a IDE, visual Code, the part is placed normally without error. The error that I am getting for the internal python is below: This error is preventing Python from shutting down normally and thus the "hang".
The error is:
File "C:\Users\gteac\Documents\Keynotes\A_keynotes.py", line 799, in <lambda>
place_key = Button(root,text="Place KeyNote",command=lambda : archicad_element(buffer)) # Sets note in Archicad
File "C:\Users\gteac\Documents\Keynotes\A_keynotes.py", line 341, in archicad_element
response = acc.ExecuteAddOnCommand(act.AddOnCommandId('AdditionalJSONCommands','KeyNote'),parameters)
File "C:\Users\gteac\AppData\Local\Programs\Python\Python39\lib\site-packages\archicad\releases\ac25\b2255commands.py", line 183, in ExecuteAddOnCommand
raise UnsucceededCommandCall(result)
archicad.releases.ac25.b2255commands.UnsucceededCommandCall: {'succeeded': False, 'error': {'code': 4001, 'message': 'Invalid program status (ongoing user input)'}}
I have no idea what err 4001 means or where to look? I made a demo video which shows the problem.
https://youtu.be/ASEnYeoCRoc
Any thoughts on what I need to look at further?
The error is:
File "C:\Users\gteac\Documents\Keynotes\A_keynotes.py", line 799, in <lambda>
place_key = Button(root,text="Place KeyNote",command=lambda : archicad_element(buffer)) # Sets note in Archicad
File "C:\Users\gteac\Documents\Keynotes\A_keynotes.py", line 341, in archicad_element
response = acc.ExecuteAddOnCommand(act.AddOnCommandId('AdditionalJSONCommands','KeyNote'),parameters)
File "C:\Users\gteac\AppData\Local\Programs\Python\Python39\lib\site-packages\archicad\releases\ac25\b2255commands.py", line 183, in ExecuteAddOnCommand
raise UnsucceededCommandCall(result)
archicad.releases.ac25.b2255commands.UnsucceededCommandCall: {'succeeded': False, 'error': {'code': 4001, 'message': 'Invalid program status (ongoing user input)'}}
I have no idea what err 4001 means or where to look? I made a demo video which shows the problem.
Any thoughts on what I need to look at further?
Gerry
Windows 11 - Visual Studio 2022; ArchiCAD 27
Windows 11 - Visual Studio 2022; ArchiCAD 27
0 REPLIES 0