Is Multithreading Possible in ObjectARX? Does AutoCAD Support It?

Is Multithreading Possible in ObjectARX? Does AutoCAD Support It?

ashutosh_laley_109
Participant Participant
947 Views
2 Replies
Message 1 of 3

Is Multithreading Possible in ObjectARX? Does AutoCAD Support It?

ashutosh_laley_109
Participant
Participant

I’m working with ObjectARX to process large DWG files and am exploring ways to improve performance with multithreading.

  • Is multithreading possible in ObjectARX?
  • Does AutoCAD support it, or are there specific limitations?

If anyone has experience with this or best practices to share, I’d appreciate it. Thank you!

0 Likes
Accepted solutions (1)
948 Views
2 Replies
Replies (2)
Message 2 of 3

tbrammer
Advisor
Advisor
Accepted solution

Short answer: No. According to the docs all ObjectARX API functions must be called from the main thread.

You can use multithreading in an ARX application as long as all other threads only call non-ARX functions.

 

For certain tasks it can make sense to run multiple instances of the AutoCAD core console (accoreconsole.exe) and let it process data. For instance you could do things like parallel plotting of DWGs to PDF or parallel processing of multiple DWGs.


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Message 3 of 3

daniel_cadext
Advisor
Advisor

I use POD classes like AcGePoint3d in parallel foreach or std::execution::par.

You can move data from DbObjects into your own POD classes.

would be nice if there was a kParallelForRead option for dbobjects

 

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx