Bom sorting using multiple keys (further explanation)

Discussion in 'SolidWorks' started by Mark, Jan 27, 2004.

  1. Mark

    Mark Guest

    hello,

    I posted this message last year and just recieved a message indicating
    some interest, but I realize there was confusion about how to
    implement this simple yet slightly tricky technique.
    The old thread can be found by searching "bom sorting".

    The tip was a method for sorting a BOM using muliple keys (like one
    can in EXCEL but not the EXCEL Solidworks BOM).

    The tip is to create an extra custom property, "Sortkey" that
    concatenates the various strings together (of your choosing)
    to create one new custom property. This property is entered into all
    parts and assemblies and is used only for sorting the BOM. It is
    not shown in the BOM.

    This would best be done by using a customized custom property entry
    program.

    In one example, say you want to sort by description, and you also want
    to sort the BOM so that assemblies are listed first, then weldments,
    and then hardware. Your Sortkey property would have a prefix of "1"
    for the description of Assembly parts, "2" for the description of
    weldment parts and "3" for the description of hardware parts.

    NOTE: There is no macro in the EXCEL BOM template. To prepare the
    template you add a column with the Header "Sortkey" and 'name' that
    Cell "Sortkey" and then hide the column in EXCEL before saving
    the template.

    After inserting the BOM into the drawing,
    from within the "Contents" tab of the BOM "Properties" dialog
    one would drag the mouse cursor across the header row by the word
    "DESCRIPTION" to uncover the hidden column, then execute a sort
    of the BOM as you normally would by clicking on the column named
    "SORTKEY" while holding the CNTRL key down. The column will remain
    hidden in the EXCEL BOM even though you 'exposed' it in the dialog box

    For example, if the Sortkey column were shown the BOM, it
    would look like this:

    ITEM QTY SORTKEY DESCRIPTION
    1 1 1DEF, ASSY 1 DEF, ASSY 1
    2 1 1EFG, ASSY 2 EFG, ASSY 2
    3 1 1FGH, ASSY 3 FGH, ASSY 3
    4 1 2ABC, WELDED BRACKET 1 ABC, WELDED BRACKET 1
    5 1 2BCD, WELDED BRACKET 2 BCD, WELDED BRACKET 2
    6 1 2XYZ, WELDED BRACKET 3 XYz, WELDED BRACKET 3
    7 1 3ABC, HARDWARE 1 ABC, HARDWARE 1
    ETC..


    The BOM _actually_ will look like this in Solidworks, notice that the
    assemblies are grouped together and then the Weldments are grouped
    together, etc.

    ITEM QTY DESCRIPTION
    1 1 DEF, ASSY 1
    2 1 EFG, ASSY 2
    3 1 FGH, ASSY 3
    4 1 ABC, WELDED BRACKET 1
    5 1 BCD, WELDED BRACKET 2
    6 1 XYz, WELDED BRACKET 3
    7 1 ABC, HARDWARE 1

    without this special "Sortkey" column, the BOM could be sorted by
    description
    and it would look like this.

    ITEM QTY DESCRIPTION
    1 1 ABC, HARDWARE 1
    2 1 ABC, WELDED BRACKET 1
    3 1 BCD, WELDED BRACKET 2
    4 1 DEF, ASSY 1
    5 1 EFG, ASSY 2
    6 1 FGH, ASSY 3
    7 1 XYz, WELDED BRACKET 3

    where the different types of parts are not grouped together

    Hope this helps.
     
    Mark, Jan 27, 2004
    #1
  2. Mark

    kenneth b Guest

    not sure if you're aware of this but, the bom sort order can be easily
    manipulated by alt+drag the sub-assy/part in the fm.
     
    kenneth b, Jan 27, 2004
    #2
  3. Mark

    Mark Guest

    Yes, I am aware of that feature. It is good of you to point this out
    for others reading thru this who may be able to use that techique.

    The reason I do not use that method is that it falls apart when there are
    sub-assemblies present in the assembly that are set to show their children
    in the BOM as opposed to showing themselves in the BOM. I do not think
    there is any strategy of sorting the feature manager tree that can
    over come this. I always use the "Show parts only" option when creating
    the BOM table and use the configuration setting "Dont' show child components
    in BOM when used as sub-assembly" in order to control which assemblies
    are in the BOM and which ones are phantoms that disappear and only show
    their children.
     
    Mark, Jan 28, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.