Message 1 of 2
ReferencedFileDescriptor.ReplaceReference Failed IV2010

Not applicable
09-10-2012
05:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi All,
The code below give me an error "Invalid procedure call or argument". I have inventor 2010 installed on the machine. Please help. Thank you!
Sub ChangeReferenceFile()
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
'provided your active document is an .idw
Dim oFileDialog As FileDialog
Call ThisApplication.CreateFileDialog(oFileDialog)
oFileDialog.ShowOpen
Dim sFileName As String
sFileName = oFileDialog.FileName
oDoc.ActiveSheet.DrawingViews(1).ReferencedDocumentDescriptor.ReferencedFileDescriptor.ReplaceReference (sFileName)
End Sub
Hank