06-08-2017
08:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-08-2017
08:15 AM
Hi kevin.hay,
I think you'd want to work with referenced files rather than occurrences. Here's a quick example.
Warning: run this on a small example file set, as it shows a message box for each referenced file name, which could mean dozens and dozens of clicks if you run this on a large assembly file, as is.
Also just as a tip, programming questions of this type are better suited to search/ask on the Inventor Customization forum :
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Dim oAsmDoc As AssemblyDocument
oAsmDoc = ThisApplication.ActiveDocument
Dim oDoc As Document
Dim oRefFile As FileDescriptor
For Each oDoc In oAsmDoc.AllReferencedDocuments
MessageBox.Show(oDoc.FullFileName, "iLogic")
For Each oRefFile In oDoc.file.ReferencedFileDescriptors
MessageBox.Show("This File: " & vbLf & oDoc.FullFileName _
& vbLf & vbLf & "Refrences this file: " & vbLf & oRefFile.FullFileName, "iLogic")
Next
Next