<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Python Add-On Command Handler Error in Archicad Python API</title>
    <link>https://community.graphisoft.com/t5/Archicad-Python-API/Python-Add-On-Command-Handler-Error/m-p/282985#M45</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;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".&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The error is:&lt;BR /&gt;&lt;BR /&gt;File "C:\Users\gteac\Documents\Keynotes\A_keynotes.py", line 799, in &amp;lt;lambda&amp;gt;&lt;BR /&gt;place_key = Button(root,text="Place KeyNote",command=lambda : archicad_element(buffer)) # Sets note in Archicad&lt;BR /&gt;File "C:\Users\gteac\Documents\Keynotes\A_keynotes.py", line 341, in archicad_element&lt;BR /&gt;response = acc.ExecuteAddOnCommand(act.AddOnCommandId('AdditionalJSONCommands','KeyNote'),parameters)&lt;BR /&gt;File "C:\Users\gteac\AppData\Local\Programs\Python\Python39\lib\site-packages\archicad\releases\ac25\b2255commands.py", line 183, in ExecuteAddOnCommand&lt;BR /&gt;raise UnsucceededCommandCall(result)&lt;BR /&gt;archicad.releases.ac25.b2255commands.UnsucceededCommandCall: {'succeeded': False, 'error': {'code': 4001, 'message': 'Invalid program status (ongoing user input)'}}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have no idea what err 4001 means or where to look? I made a demo video which shows the problem.&lt;BR /&gt;&lt;BR /&gt;&lt;S&gt;&lt;/S&gt; &lt;A href="https://youtu.be/ASEnYeoCRoc" target="_blank" rel="noopener"&gt;https://youtu.be/ASEnYeoCRoc&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Any thoughts on what I need to look at further?&lt;/DIV&gt;</description>
    <pubDate>Thu, 26 Sep 2024 10:21:54 GMT</pubDate>
    <dc:creator>poco2013</dc:creator>
    <dc:date>2024-09-26T10:21:54Z</dc:date>
    <item>
      <title>Python Add-On Command Handler Error</title>
      <link>https://community.graphisoft.com/t5/Archicad-Python-API/Python-Add-On-Command-Handler-Error/m-p/282985#M45</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;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".&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The error is:&lt;BR /&gt;&lt;BR /&gt;File "C:\Users\gteac\Documents\Keynotes\A_keynotes.py", line 799, in &amp;lt;lambda&amp;gt;&lt;BR /&gt;place_key = Button(root,text="Place KeyNote",command=lambda : archicad_element(buffer)) # Sets note in Archicad&lt;BR /&gt;File "C:\Users\gteac\Documents\Keynotes\A_keynotes.py", line 341, in archicad_element&lt;BR /&gt;response = acc.ExecuteAddOnCommand(act.AddOnCommandId('AdditionalJSONCommands','KeyNote'),parameters)&lt;BR /&gt;File "C:\Users\gteac\AppData\Local\Programs\Python\Python39\lib\site-packages\archicad\releases\ac25\b2255commands.py", line 183, in ExecuteAddOnCommand&lt;BR /&gt;raise UnsucceededCommandCall(result)&lt;BR /&gt;archicad.releases.ac25.b2255commands.UnsucceededCommandCall: {'succeeded': False, 'error': {'code': 4001, 'message': 'Invalid program status (ongoing user input)'}}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have no idea what err 4001 means or where to look? I made a demo video which shows the problem.&lt;BR /&gt;&lt;BR /&gt;&lt;S&gt;&lt;/S&gt; &lt;A href="https://youtu.be/ASEnYeoCRoc" target="_blank" rel="noopener"&gt;https://youtu.be/ASEnYeoCRoc&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Any thoughts on what I need to look at further?&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Sep 2024 10:21:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-Python-API/Python-Add-On-Command-Handler-Error/m-p/282985#M45</guid>
      <dc:creator>poco2013</dc:creator>
      <dc:date>2024-09-26T10:21:54Z</dc:date>
    </item>
  </channel>
</rss>

