DohPee
Computer
- Jun 25, 2002
- 12
Hey All,
I need some help with a little Excel VBA prog that I wrote to traverse a BOM on a Drawing.
I am using SW2001+ and Excel 2000.
What the prog does is open a SW Drawing, looks for a BOM then attaches to the bom and goes through each part listed by opening the drawing for that part and looking for a bom etc.
Now my problem is that the prog works fine until a drawing has a part that is not displayed on the bom but is part of the bom. ie. in the drawing under BOM properties/Contents the Item is not ticked.
My prog still tries to traverse this part even though you cannot see it on the bom. The prog needs to ignore this part as it has been put on the Drawing as a Reference and is not part of the Assembly.
Any Ideas?
Here is a summary snippet of my code:
swDrwViewBOM.Attach2
For iCount = 1 To iViewBOMCount
If swDrwViewBOM.IsVisible = True Then
strViewBOMItem = swDrwViewBOM.GetEntryText(iCount, 2)
strViewBOMQty = swDrwViewBOM.GetEntryText(iCount, 3)
debug.print strViewBOMItem & " - " & strViewBOMQty
End If
Next
swDrwViewBOM.detach
I need some help with a little Excel VBA prog that I wrote to traverse a BOM on a Drawing.
I am using SW2001+ and Excel 2000.
What the prog does is open a SW Drawing, looks for a BOM then attaches to the bom and goes through each part listed by opening the drawing for that part and looking for a bom etc.
Now my problem is that the prog works fine until a drawing has a part that is not displayed on the bom but is part of the bom. ie. in the drawing under BOM properties/Contents the Item is not ticked.
My prog still tries to traverse this part even though you cannot see it on the bom. The prog needs to ignore this part as it has been put on the Drawing as a Reference and is not part of the Assembly.
Any Ideas?
Here is a summary snippet of my code:
swDrwViewBOM.Attach2
For iCount = 1 To iViewBOMCount
If swDrwViewBOM.IsVisible = True Then
strViewBOMItem = swDrwViewBOM.GetEntryText(iCount, 2)
strViewBOMQty = swDrwViewBOM.GetEntryText(iCount, 3)
debug.print strViewBOMItem & " - " & strViewBOMQty
End If
Next
swDrwViewBOM.detach