Thread and memory issues of NAVISWORKS API

Thread and memory issues of NAVISWORKS API

1905867998
Participant Participant
263 Views
1 Reply
Message 1 of 2

Thread and memory issues of NAVISWORKS API

1905867998
Participant
Participant

I have implemented two main functions in my plugin. The first one is to monitor in real-time whether the source file has changed and automatically update the model through Timer. The second step is to obtain the specified properties of all components of all models, and then connect to the database to automatically save the obtained data to the database. To avoid blocking the UI thread, I have performed asynchronous operations or semaphore methods on almost all methods that traverse to obtain component properties. However, my plugin function can run smoothly when there are few models, but whenever there are a large number of models, the code will always report errors in various places after running for a period of time. The most common error is System AccessViolationException:: Attempt to read or write to protected memory. This usually indicates that other memory is damaged

1905867998_1-1741713255056.png

 

1905867998_0-1741713223251.png

 


May I ask if the NAVISWORKS. net framework API does not support asynchronous operations to traverse and obtain information about all components? Or is there a problem with my method? I would greatly appreciate it if you could assist me through email(yufei0205@gmail.com) or remote means.

0 Likes
264 Views
1 Reply
Reply (1)
Message 2 of 2

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @1905867998 ,

 

Could you please take a look at this below link?

https://forums.autodesk.com/t5/navisworks-api/what-is-the-best-way-to-iterate-through-a-modelitemcol... 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes