Is it possible to get the BOM from a file without openening SW?

We have Files scattered in facilites around the world.  It takes forever to try to open a file that resides on a remote server.  Does anyone know of a way to get the BOM from a Drawing file on a remote server without having to open that file?

SolidworksApi macros
Answers 15
SF
SF 2010-07-15 Best Answer

That's what I do.  You need some custom programming.  I can do it for you, or I can try and help you through the process.

Jesse Seger

www.segerlabs.com

SF
SF 2010-07-15

Ok, so point me in the right direction.

SF
SF 2010-07-16

What we would to is write an application that would select a drawing or assembly, extract the BOM, and then do whatever you want with it.  The application would use the DM API.  If the files are in the vault, we would also have to use the PDM API.

Important Note.  This only words if you have Feature Based BOMs and not Excel Based.  If you have Excel based BOMs, then we need to open up the drawing or assembly and essentially all the parts will be loaded as well.

SF
SF 2010-07-16

OK, I kind of thought that I would need to use the DM.  I have never worked with it before, so do you know of any threads or sites where I can go to get started on it?

SF
SF 2010-07-16

This site is the best for what you're looking for.  I would start reading the API help before bed if you're serious.

SF
SF 2010-07-16

Is there a separate API for DM?

SF
SF 2010-07-16

I found it.  after reading some other threads, it is located in the rugulare API.

SF
SF 2010-07-16

We need this to!

SF
SF 2010-07-16

Go to solidworks API Help.

Click on the contents Tab

Select SolidWorks Document Manager API Help.

Have fun reading.  There is a VB6 Example too.

SK
SK 2010-07-16

Try checking out https://forum.solidworks.com/thread/35037 I posted an example of how to use DM to get and read a bom file.

SF
SF 2010-07-16

SW DM isn't going to work for any of it here. You cannot get the correct assembly structure for suppression states, nor can you get any evaluated custom property values so if you use a custom property "Length" from a part for example, and its value is "D1@Sketch1", which resolves to 25.4 for example, using SW DM would result in the value being the actual formula not value.

There are some other issues too.

Luke Malpass

AngelSix (SolidWorks Tutorials and Books)

BatchProcess

SF
SF 2010-07-19

Are you saying that Supressed items would show up in the BOM?

Could I go back to the custom properties of the part and get the value?

What other problems would I have?

SF
SF 2010-07-19

Thanks Shawn, actually I had already found it and used it.

SF
SF 2010-07-21

Boy, you can't accuse SW of rushing into anything.  I sent a request for a license on Friday, received an automated response on Monday and still haven't heard back from them.

I guess i have been spoiled by my VAR.  The Automated response comes back right away and I get a phone call or answer within two hours.

DM
DM 2010-08-02

I have created BOMs from the assembly file without have to open the part files. It still needs SolidWorks to open the .sldasm file. If you have a key for the document manager it runs faster. As Luke stated it will not report values from custom propertied but it will report the file name and number of files in the assembly.

If anyone wants to see it post.

Dan Miel