Hi, try to execute the following ilogic rule from the assembly. I think I could do what you need. Be sure to put the name you want to appear on each component. I have attenuated a few examples as comments in the code.
Dim oDoc As AssemblyDocument = ThisDoc.Document
Dim i As Integer
Dim oPropertyA As String
Dim oPane As BrowserPane
oPane = oDoc.BrowserPanes.Item(1) '"Model"
For Each oOcc As ComponentOccurrence In oDoc.ComponentDefinition.Occurrences
Try
Dim oOccDoc As Document = oOcc.Definition.Document
oPropertyA = oOccDoc.PropertySets.Item("Design Tracking Properties").Item("Part Number").Value
'oPropertyA = oOccDoc.DisplayName
'oPropertyA = oOccDoc.PropertySets.Item("Inventor User Defined Properties").Item("P").Value
'oPropertyA = oOccDoc.PropertySets.Item("Design Tracking Properties").Item("Part Number").Value
'oPropertyA = oOccDoc.PropertySets.Item("Design Tracking Properties").Item("Description").Value
Dim oNode As BrowserNode = oPane.GetBrowserNodeFromObject(oOcc)
i = 0
Line1 :
i=i+1
Try
oNode.NativeObject.Name = oPropertyA & ": " & i
Catch
GoTo Line1
End Try
Catch
End Try
Next
I hope it is useful for you. Regards
Please accept as solution and give likes if applicable.
I am attaching my Upwork profile for specific queries.
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn