Inventor 11 links

Inventor 11 links

Anonymous
Not applicable
355 Views
3 Replies
Message 1 of 4

Inventor 11 links

Anonymous
Not applicable
Our drawing files have a link to a *.bmp logo file. Unfortunately, the server with that file has been removed from service. When we open old drawing files, Inventor searches for up to 2 hours before offering a resolution. Does anyone have a VBA method for disolving the link?
0 Likes
356 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
The macro below opens a drawing in "silent" mode and deletes all the missing
OLE references from it. If the logo was embedded in a titleblock, Inventor
will put up a "file missing" message the next time you edit the titleblock
definition.

Sanjay-

Sub DeleteMissingReferences()

ThisApplication.SilentOperation = True

Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.Documents.Open("C:\temp\junk.idw")

Dim oOLEFileDescriptor As ReferencedOLEFileDescriptor
For Each oOLEFileDescriptor In oDoc.ReferencedOLEFileDescriptors

If oOLEFileDescriptor.ReferenceStatus = kMissingReference Then
oOLEFileDescriptor.Delete
End If
Next

ThisApplication.SilentOperation = False

End Sub

wrote in message news:5733834@discussion.autodesk.com...
Our drawing files have a link to a *.bmp logo file. Unfortunately, the
server with that file has been removed from service. When we open old
drawing files, Inventor searches for up to 2 hours before offering a
resolution. Does anyone have a VBA method for disolving the link?
0 Likes
Message 3 of 4

Anonymous
Not applicable
Thank you very much. I took a few weeks to make sure your solution works in our drawings. I have added an error trapping move and tell VBA to print the drawings so the user can see that the bitmap is removed. I also use an input box to request an entire folder to work on at one time. Inventor still takes a very long time opening the files, but this is one program that can be run at night when we go home.
0 Likes
Message 4 of 4

Mark_Wigan
Collaborator
Collaborator

hello, would you still have the ammended code that you generated for this? i have to do some batch processing on a lot of files with incorrect logo paths.

 

many thanks.

 

best regards,
- Mark

(Kudo or Tag if helpful - in case it also helps others)

PDSU 2020 Windows 10, 64bit.

0 Likes