<?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 Re: ObjectARX, threads problem?? in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/objectarx-threads-problem/m-p/12223352#M1464</link>
    <description>&lt;P&gt;ObjectARX is not thread-safe and multithreading is not supported...&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-85F9B4B9-1949-4BA2-AE95-8FB85CC5CE47" target="_blank"&gt;https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-85F9B4B9-1949-4BA2-AE95-8FB85CC5CE47&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Sep 2023 00:16:18 GMT</pubDate>
    <dc:creator>daniel_cadext</dc:creator>
    <dc:date>2023-09-07T00:16:18Z</dc:date>
    <item>
      <title>ObjectARX, threads problem??</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/objectarx-threads-problem/m-p/12222890#M1463</link>
      <description>&lt;P&gt;If I have a function called 'linedraw' whose purpose is to create an 'acdb' object, and that function runs on a different thread using std::thread, I encounter an error with an 'Unhandled Access Violation Reading' message. The primary goal of running this function on a separate thread is to prevent it from blocking the main AutoCAD application. However, when I attempt to call this function inside the ARX entry point as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;case AcRx::kInitAppMsg:&lt;/P&gt;&lt;P&gt;std::thread(linedraw).detach(); // !!!!!!!&lt;/P&gt;&lt;P&gt;break;&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I encounter the mentioned error. My intention is to avoid blocking the main AutoCAD app, especially when dealing with functions that may run indefinitely, such as calculations. Is there a solution for this scenario? Additionally, if I have the 'linedraw' function that should be triggered automatically (not from the command window) and can be initiated from another void() function or an external UI, is there a way to achieve this without causing the AutoCAD application to become unresponsive?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 19:15:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/objectarx-threads-problem/m-p/12222890#M1463</guid>
      <dc:creator>suparhigh12345</dc:creator>
      <dc:date>2023-09-06T19:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: ObjectARX, threads problem??</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/objectarx-threads-problem/m-p/12223352#M1464</link>
      <description>&lt;P&gt;ObjectARX is not thread-safe and multithreading is not supported...&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-85F9B4B9-1949-4BA2-AE95-8FB85CC5CE47" target="_blank"&gt;https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-85F9B4B9-1949-4BA2-AE95-8FB85CC5CE47&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 00:16:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/objectarx-threads-problem/m-p/12223352#M1464</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2023-09-07T00:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: ObjectARX, threads problem??</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/objectarx-threads-problem/m-p/12224294#M1465</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Does this mean that there is no way to utilize ObjectARX from a different thread, and is it impossible to include an infinite loop calculation as a function inside 'kInitAppMsg' without blocking the AutoCAD application?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 11:02:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/objectarx-threads-problem/m-p/12224294#M1465</guid>
      <dc:creator>suparhigh12345</dc:creator>
      <dc:date>2023-09-07T11:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: ObjectARX, threads problem??</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/objectarx-threads-problem/m-p/12224305#M1466</link>
      <description>&lt;P&gt;Yes, you can't call any AcDb* API from different thread other than main thread.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 11:09:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/objectarx-threads-problem/m-p/12224305#M1466</guid>
      <dc:creator>moogalm</dc:creator>
      <dc:date>2023-09-07T11:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: ObjectARX, threads problem??</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/objectarx-threads-problem/m-p/12224315#M1467</link>
      <description>&lt;P&gt;Maybe you can use an event, a command event, AcedWatchWinMsgFn or on idle&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 11:14:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/objectarx-threads-problem/m-p/12224315#M1467</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2023-09-07T11:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: ObjectARX, threads problem??</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/objectarx-threads-problem/m-p/12224395#M1468</link>
      <description>&lt;H3 class="entry-header"&gt;&lt;A href="https://adndevblog.typepad.com/autocad/2012/06/how-to-use-threads-in-objectarx.html" target="_blank" rel="noopener"&gt;How to use threads in ObjectARX?&lt;/A&gt;&lt;/H3&gt;</description>
      <pubDate>Thu, 07 Sep 2023 11:45:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/objectarx-threads-problem/m-p/12224395#M1468</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2023-09-07T11:45:12Z</dc:date>
    </item>
  </channel>
</rss>

