1 Reply Latest reply on May 28, 2016 12:51 AM by Tim Webb

    SolidWorks/EPDM/Document Manager BOM Problem

    Jim Sculley

      SW2013 SP4

      Enterprise PDM 2013 SP4

       

      I have created an EPDM add-in to allow users to right click on an assembly file (or a drawing or PDF of an assembly) to display a 'Print BOM' menu item.  The addin will open Excel and create a nicely formatted BOM for printing like this:

      bom_printer_2.31-1.png

      Because we do not have a formal ECO/ECN process, it is not uncommon for a part drawing to be revised without updating the assemblies where it is used.  To highlight such items they are displayed in bold red text as shown above. 

       

      Internally, the add-in is retrieving the BOM from the SolidWorks drawing (using GetDerivedBOM).  This BOM may be out of date if any of its components have been revised so I call GetComputedBOM and replace any out of date info. Any such replacements are flagged so that I can highlight them in the Excel output.

       

      This would all work OK except that the GetComputedBOM method requires a configuration name as a parameter.  The IEdmBom returned from GetDerivedBOM does not provide access to the configuration(s) referenced by the BOM.  I thought I would be able to use the Document Manager API where the ISwDMTable object has a ReferencedConfigurationNames property but that always returns all the configurations in the model, not just the configurations in the BOM.

       

      So at this point I appear to be stuck, unless I am missing something.

       

      Does anyone know of a way to determine what configuration(s) a derived BOM is referencing? 

       

      Jim S.

        • Re: SolidWorks/EPDM/Document Manager BOM Problem
          Tim Webb

          Jim,

          Did you get this resolved?

          I've recently run into this problem again myself. This has been an issue for as long as I can recall so my solution was to get the derived (named) BOM and cross reference with the DocMgr BOM files for their used configurations (almost instantaneous performance). This seems to work pretty well BUT there are 2 cautions:

           

          1. Weldments. If they are used in the CAD model, they won't show up in the GetComputedBOM as far as I can tell. It's like they are multiple part numbers in one part but they aren't accounted for in the database? They don't export in the native XML data export either!
          2. If the user has never checked out the assembly and checked it back in, the references for the assembly will appear to be the ones that were last referenced before the files were added to EPDM.

          The GetReferencedFiles/AddReference method from the API help is VERY slowwwwwwww so I try not to use it.

          Tim