Hello all
Is it possible to go trough the part list in a drawing and check the BOM structure of every component in it?
I manage to go trough the part list, but i Don't know how to get the component of a specific row, to check it's Bom structure.
Anybody any info on this ?
Thank you.
I think this might help you get there a little:
Specifically, this part of the code grabs the referenced document for each row (I deleted the nonrelevant parts). FYI, You have to have a partslist selected before you run the program.
Dim drawDoc As Document
Set drawDoc = ThisApplication.ActiveDocument
If Not (TypeOf drawDoc Is DrawingDocument) Then
MsgBox “A drawing must be active.”
GoTo retry
End If
‘ Make sure a parts list is selected.
Dim partList As Object
Set partList = drawDoc.SelectSet.Item(1)
If Not (TypeOf partList Is PartsList) Then
MsgBox “A parts list must be selected.”
GoTo retry
End If
Dim drawBomRow As DrawingBOMRow
For Each partListRow In partList.PartsListRows
‘ Get the thumbnail from the document associated with the current row.
Set drawBomRow = partListRow.ReferencedRows.Item(1)
Dim refDoc As Document
Set refDoc = drawBomRow.BOMRow.ComponentDefinitions.Item(1).Document
'Do whatever you're going to do with the component here.
Next
I think this should work with iLogic.
Hope that helps,
Dave
Can't find what you're looking for? Ask the community or share your knowledge.