Message 1 of 4
Get DisplayName of a parent's part
Not applicable
06-19-2019
06:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is there a way to get all the Display Name of a Parent's Part or Assembly using a VBA "Inventor 2019".
i tried to extract the compenent but i don't know how to get the parents :
Private Sub CommandButton1_Click()
Dim OApp As Inventor.Application
Set OApp = GetObject(, "Inventor.Application")
Dim oDoc As Document
Set oDoc = OApp.ActiveDocument
Dim oAllrefdocs As DocumentsEnumerator
Set oAllrefdocs = oDoc.ReferencedFiles
Dim oSubDoc As Document
Dim oSubDoc1 As Document
Dim sMsg As String
Dim iLeafNodes As Long
Dim iSubAssemblies As Long
Dim i As Integer
For i = 1 To oAllrefdocs.Count
ListBox1.AddItem oAllrefdocs.Item(i).DisplayName
Next
End Sub