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?