How to display Part Number + Description in Assembly Browser?

How to display Part Number + Description in Assembly Browser?

tecnico3ZDE6R
Explorer Explorer
242 Views
4 Replies
Message 1 of 5

How to display Part Number + Description in Assembly Browser?

tecnico3ZDE6R
Explorer
Explorer

Hi,

I am working in Autodesk Inventor with Vault and using a coding system where:

File name = progressive code

Part Number = same code

Description = readable name

 

In the Assembly Browser, I currently only see the file name (or part number), which makes it difficult to navigate because I see only codes (e.g., 00200001).

I would like to display something like:
Part Number + Description (e.g., 00200001 – DN50 Pipe P235GH)

In Solid Edge this is possible, but I cannot find a way to do it in Inventor.

Is there:a built-in option to customize Browser Node display?

or an official method to combine multiple iProperties in the browser?

I am looking for a clean and stable solution (preferably without manual renaming).

Thanks in advance.

0 Likes
Accepted solutions (1)
243 Views
4 Replies
Replies (4)
Message 2 of 5

Michiel.Valcke
Advisor
Advisor

You can do this with some simple iLogic Rules:
How to modify the component names in Inventor model browser : Geo-IT (Dutch)

 

This iLogic Rule will give you the part numbers in the model browser:

Sub main()
Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument
Call TraverseAssembly(oAsmDoc.ComponentDefinition.Occurrences)
End Sub

Private Sub TraverseAssembly(Occurrences As ComponentOccurrences)
On Error Resume Next
Dim oOcc As ComponentOccurrence
Dim lngPos As Long
Dim IndexValue As String ' Renamed from "Index" to "IndexValue"

For Each oOcc In Occurrences
If oOcc.DefinitionDocumentType = kAssemblyDocumentObject Then
Call TraverseAssembly(oOcc.SubOccurrences)
End If

lngPos = InStrRev(oOcc.Name, ":", -1)
IndexValue = "" ' Initialize IndexValue variable
IndexValue = Trim(Mid(oOcc.Name, lngPos, Len(oOcc.Name)))

' Use the renamed variable to update the occurrence name
oOcc.Name = oOcc.Definition.Document.PropertySets.Item(3).Item("Part Number").Value & IndexValue
Next
End Sub

 

This iLogic Rule will give you the Description in the Model Browser

Sub main()
    Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument
    Call TraverseAssembly(oAsmDoc.ComponentDefinition.Occurrences)
End Sub

Private Sub TraverseAssembly(Occurrences As ComponentOccurrences)
    On Error Resume Next
    Dim oOcc As ComponentOccurrence
    Dim lngPos As Long
    Dim IndexValue As String ' Renamed variable from "Index" to "IndexValue"
    
    For Each oOcc In Occurrences
        If oOcc.DefinitionDocumentType = kAssemblyDocumentObject Then
            Call TraverseAssembly(oOcc.SubOccurrences)
        End If

        lngPos = InStrRev(oOcc.Name, ":", -1)
        IndexValue = "" ' Initialize the new IndexValue variable
        IndexValue = Trim(Mid(oOcc.Name, lngPos, Len(oOcc.Name)))

        ' Use the renamed variable to update the occurrence name
        oOcc.Name = oOcc.Definition.Document.PropertySets.Item(3).Item("Description").Value & IndexValue
    Next
End Sub

 

This iLogic rule will give you PartNumber & Description in the model browser:

Sub main()
    Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument
    Call TraverseAssembly(oAsmDoc.ComponentDefinition.Occurrences)
End Sub

Private Sub TraverseAssembly(Occurrences As ComponentOccurrences)
    On Error Resume Next
    Dim oOcc As ComponentOccurrence
    Dim lngPos As Long
    Dim IndexValue As String ' Renamed from "Index" to "IndexValue"
    
    For Each oOcc In Occurrences
        If oOcc.DefinitionDocumentType = kAssemblyDocumentObject Then
            Call TraverseAssembly(oOcc.SubOccurrences)
        End If

        lngPos = InStrRev(oOcc.Name, ":", -1)
        IndexValue = "" ' Initialize IndexValue variable
        IndexValue = Trim(Mid(oOcc.Name, lngPos, Len(oOcc.Name)))

        ' Use the renamed variable to update the occurrence name
        oOcc.Name = oOcc.Definition.Document.PropertySets.Item(3).Item("Part Number").Value & " (" & oOcc.Definition.Document.PropertySets.Item(3).Item("Description").Value & ")" & IndexValue
    Next
End Sub

 

Message 3 of 5

tecnico3ZDE6R
Explorer
Explorer

OK... but its sound like workaround.... Solid EDGE is Better!

0 Likes
Message 4 of 5

Michiel.Valcke
Advisor
Advisor
Accepted solution

https://help.autodesk.com/view/INVNTOR/2027/ENU/?guid=GUID-C5ADE109-10E9-41A0-BC4A-BE73AA68A1C7

In the manage tab, click add external rule, save the rule. You can set a trigger to apply it each time an assembly is saved/opened/created/ ... or you can run it manually.

Message 5 of 5

johnsonshiue
Community Manager
Community Manager

Hi! Another tool to look into is Mighty Browser by coolOrange. It is a free app available at Inventor App store.

 

https://marketplace.autodesk.com/apps/3c0dc11b-d07c-47d4-b8a6-6b5d7ed2e99c?priceId=40f569d1-986a-476...

 

Many thanks!



Johnson Shiue ([email protected])
Software Test Engineer