×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

BOM Traverse in VBA Problem

BOM Traverse in VBA Problem

BOM Traverse in VBA Problem

(OP)
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

     

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources