- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have an add-in that does a few things on documents before saving. On drawings, I collapse the browser tree & fit the view. This takes about a quarter of a second.
I'd like to also sort the parts list(s), but retrieving them and doing a Sort2() on them now makes saving take more than 1.5 seconds on a drawing with a single PartsList, which is annoying if you're saving frequently. I'd like to do something like (pseudo code)
if(!partsList.IsSorted)
{
partsList.Sort2(...);
}
so that it doesn't actually sort every time -- only when necessary.
I thought about using drawing.ReferencedDocuments to get the model and getting the ReasonsForChange from part.DocumentEvents, but it seems messy and Inventor.CommandTypesEnum.kShapeEditCmdType doesn't seem specific enough. Any suggestions are appreciated.
Solved! Go to Solution.