Anyone have a macro to export a BOM, then delete it?

Discussion in 'SolidWorks' started by SW Monkey, Jul 26, 2006.

  1. SW Monkey

    SW Monkey Guest

    I would like to insert a BOM, export it to a editable file, then delete
    the BOM.

    Would it be better to use a SW based BOM or Excel based? SW Bom can
    export to .txt and .csv, Excel BOM can be exported as .xls.
     
    SW Monkey, Jul 26, 2006
    #1
  2. I don't have one like that, but I wonder if it's necessary to actually go
    through the process of creating and placing the BOM in the drawing. I would
    think that since the info is the same, maybe the API would let you create
    the file directly.

    WT
     
    Wayne Tiffany, Jul 26, 2006
    #2
  3. SW Monkey

    Jeff Guest

    I have one that I did for a customer that created the BOM through the
    API without inserting a BOM. I can not distribute this one but I can
    lead you in the right direction. There is an example macro that
    traverses the assembly and any sub assemblies and their parts. With
    this you could add the ability to count the number of instances for
    each component and derive a BOM.

    Jeff
     
    Jeff, Jul 26, 2006
    #3
  4. SW Monkey

    SW Monkey Guest

    Jeff, I actually dont need to list qtys for each part. I simply need
    the filename (which is our item number), description (custom property),
    and part type (custom property).

    Where is this example macro you are referring to?
     
    SW Monkey, Jul 26, 2006
    #4
  5. SW Monkey

    Guy Edkins Guest

    You can also use the SWDocManager and the XML stream for assemblies. It is
    blindingly quick and can be opened in Excel directly. Better still SW does
    not need to be open to do this. There are examples in the API help.

    Guy
     
    Guy Edkins, Jul 26, 2006
    #5
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.