Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
raith-mb
in reply to: op_thorsager

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