All,
I have an app which attaches an arbitrary number of reference files, then copies all elements on a level to the master dgn. When this process is complete I want to detach all the reference files. Is there a method which does that all is one shot or do I need to detach them one by one?
Thanks
microstation keyin is Reference Detach all
Brent
Yes, I figured that out, and it does work well, but I do want a way to do via the vba interface.
Thanks!
I do not understand why you could not use the keyin from BrentJames via a vba keyin.
CadInputQueue.SendKeyin "Reference Detach all"
Unless I'm missing something, Roland
Roland
V8i SS4 v.08.11.09,829AECOsim BD V8i
Unknown said:I want to detach all the reference files
There's the Attachments.Remove method. This detaches a single attachment, given its index, name, or object. As with most collections, someone has to iterate each member in order to detach it.
When removing items from a collection, remember to iterate from the end back to the beginning. Otherwise, you'll have undefined results …
Dim nAttachments As Integer nAttachments = ActiveModelReference.Attachments.Count Dim i As Integer For i = Count To 1 Step -1 ActiveModelReference.Attachments.Remove i Next i
Does that make queuing the keyin look easier?
Regards, Jon Summers LA Solutions