Tag SubAssembly to "Phantom"

Tag SubAssembly to "Phantom"

Anonymous
Not applicable
455 Views
2 Replies
Message 1 of 3

Tag SubAssembly to "Phantom"

Anonymous
Not applicable

Does anyone have the API codes to tag a sub assembly as Phantom in the BOM?

something like : If the part number of the sub assembly equals "RUN---" then tag it as "Phantom"?

 

Thank you.

Raj

0 Likes
Accepted solutions (1)
456 Views
2 Replies
Replies (2)
Message 2 of 3

bshbsh
Collaborator
Collaborator
Accepted solution

just to give you the idea, you can do something like this:

Private Sub phantom()
    For Each Occurrence In ComponentDefinition.Occurrences
        If Occurrence.Definition.Document.PropertySets.Item("Design Tracking Properties").Item("Part Number").Value = "RUN---" Then
            Occurrence.BOMStructure = kPhantomBOMStructure
        End If
    Next
End Sub

you can adapt it to your needs.

0 Likes
Message 3 of 3

Anonymous
Not applicable

You are the best!

 

Thank you so much. I tried it and it works like a charm!

 

 

0 Likes