I am looking to remove everything in a dgn file except what is visible in view 1. It looks like mdlScanCriteria_setViewTest will scan what I want to keep.And then I suppose I could create a new file with the mdlWorkDgn functions. But in years past that has not been the most reliable technique for me if the drawing has had any corruption in it.
What I would prefer is something that would scan what I want to delete. Or is there a better way to accomplish this?
BTW, I am on Microstation SS3.
In addition to Jan's comments...
Unknown said:I would prefer something that would scan what I want to delete. Or is there a better way to accomplish this?
How many times are we asked for mdlPersonal_doSomethingRemarkable()? No, there isn't a function that scans for what you want to delete: none of the MDL functions is involved with telepathy. But here's a suggestion...
Unknown said:I am on Microstation SS3
I hope you're using Viz Studio 2005 and writing C++. Use the C++ standard containers to build your lists. You may find std::map<ElementID> quite useful.
Regards, Jon Summers LA Solutions
Hi Ken,
Unknown said:But in years past that has not been the most reliable technique for me if the drawing has had any corruption in it.
Well, if data are corrupted, no code can work correctly, so a question is of the right problem is discussed.
Unknown said:What I would prefer is something that would scan what I want to delete.
I don't see any difference between to scan what to keep and to scan what to delete (which I guess is not possible). If you receive a list of what to keep, you can iterate graphical elements in the model again to create inverse list and to analyze if the elements are correct. I agree it requires more time.
Unknown said:Or is there a better way to accomplish this?
I am not sure if it's better, but you can create a fence from view and using a proper fence mode, to process it's content. A disadvantage of this approach is, I guess, it can be used in graphic mode only, so e.g. not if your application is INITAPP.
Unknown said:BTW, I am on Microstation SS3.
It's not BTW! :-) According to MicroStation Programming Best practices a title of this post should be [V8i C] and in the post content you should mention exact build name, because SS3 can be whatever from an original SS3 release to Update 2.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point