Message 1 of 3
ModelItem IsDisposed, how to avoid?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In our plugin, we keep a list of specific ModelItems of interest (let's say up to a few thousands).
Once in a while, typically when memory is under stress, some of these objects end up being disposed by Navisworks even if we have references.
For now, for each of these items, we internally keep its ModelItem "path" into the document, then before using it, we check item.IsDisposed and if true, we use the path we saved to restore the item.
It works, but looks far from optimal:
- we keep a string for each item
- we have to check before using this item
Any suggestion/better option?
For example a way to force these items to NOT be disposed?
Thanks.
Main Scientist, Full Stack Developer & When Time Permits Director of IDIGO ► On your marks, Set, Go