02-22-2023
03:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
02-22-2023
03:39 AM
No need to loop through all the sheets and views.
You only have to exchange the References in the ReferencedFileDescriptors.
This sample exchanges Item(1) by C:\Temp\Part01new.ipt
Set oDrawDoc = ThisApplication.ActiveDocument
If oDrawDoc.DocumentType <> kDrawingDocumentObject Then
MsgBox "no IDW available"
Exit Sub
End If
Dim oFile As File
Set oFile = oDrawDoc.File
Dim oFD As FileDescriptor
Set oFD = oFile.ReferencedFileDescriptors.Item(1)
Call oFD.ReplaceReference("C:\Temp\Part01new.ipt")
During copy of your IAM you have to create a list with the old and the new FullFileName of your IPTs.
Loop through all ReferencedFileDescriptors: For i = 1 to oFile.ReferencedFileDescriptors.Count
With your list you can replace each ReferencedFileDescriptors.Item(i) with the corresponding new FullFileName.
All Sheets with all views will be updated.
Regards
Roland