Message 1 of 5
Change model reference in a drawing rule. Why it doesn't work in Inv 2019?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello!
I have a rule that perfectly works in 2017. But in Inventor 2019 it doesn't work and I can't understand why...
The rule changes model reference in a drawing to new model with the same name and located same folder as drawing document . This is very useful when you have to create drawings by copying existing documents.
Code:
odoc = ThisDoc.Document Dim NF as String = ThisDoc.Path & "\" & ThisDoc.FileName(False)& ".ipt" Dim oldFD As FileDescriptor oldFD = odoc.ReferencedFileDescriptors(1).DocumentDescriptor.ReferencedFileDescriptor oldFD.ReplaceReference(NF) odoc.Update() odoc.Save
Need help...