Can I use multi threading with Solidworks API?

Not possible. All of your API calls will execute on the main thread of SOLIDWORKS with the possible exception of event handling code that might be triggered for a background thread started by SOLIDWORKS when opening large assemblies (ie concurrent loading of multiple documents).

You literally have no control over threading with SOLIDWORKS. That probably won’t change.

If you are using Winforms and you attempt to async wait API calls, you will actually make SOLIDWORKS slower because of cross thread overhead.

Achieving a responsive UI is truly a tricky deal.

If you want to achieve some sort of concurrency, try loading multiple instances of SOLIDWORKS and split your work into smaller chuncks that each process can handle independently.

1 Like