Insert top-level only BOM

You need to be logged in to view this content. Please login or become a member.

 Martavis Bryant Womens Jersey

6 Comments

  1. fdees

    When I run the macro I got a error: Run-time error ’91’: Object variable or With block variable not set
    And the following line is highlighted: Set swBomFeat = swBomAnn.BomFeature

    What am I doing wrong or what do I need to edited to the code?

  2. jfgauthier

    Hello Keith,

    I want to be able to delete a BOM and reassign a new BOM only if the old BOM don’t correspond to a certain given BOM template. Have you ever found a way to get the actual Template Name of the BOM already used in a drawing?

    I have tried using BomFeature, but it doesn’t seems to have this particular information available. Is there anyway to proceed using GetFeature? If yes, could you give me a hint how to proceed?

    Thank you.

    • I do not think that BOM templates are linked in any way to the table that is created from them, hence it is not possible to obtain this information. I do not see a way to obtain that information manually let alone programmatically. Really, a BOM table need not have anything in common with the template it was created from. (It could be modified heavily after it was inserted.) Hence the information you’re looking for might be useful from a historical point of view but not from the point of view of knowing what is actually in that BOM table.

      What you should do is examine the BOM table’s actual properties — its row names, column names, cell contents, and IBomFeature properties to see if that BOM table meets a certain criteria. If it doesn’t, then you recreate the BOM table.

  3. NewUser

    Hello Keith,

    How would a go about using a BOM in a specified location?

    “Material_BOM.sldbomtbt” in folder “C:\Solidworks Templates\BOM”

    Thanks in advance

Questions and Comments

You must be logged in to post a comment.