slydlake
6/13/2016 - 11:30 AM

Assembly Main

Assembly Main

Sub Main()

Dim oAsm As Inventor.AssemblyDocument: Set oAsm = ThisApplication.ActiveDocument
Dim iCount As Integer
iCount = 1


For Each oPrt In oAsm.AllReferencedDocuments
    If oAsm.AllReferencedDocuments.Item(iCount).DocumentType = kPartDocumentObject Then
        MsgBox (oPrt.ActiveMaterial.DisplayName)
        
    End If
    iCount = iCount + 1
Next

End Sub