6 Replies Latest reply on Jul 7, 2015 11:12 AM by Danny Bradford

    best method to extract BOM from ePDM?

    Danny Bradford

      Greetings,

       

      We are struggling mightily to extract a BOM programmatically from ePDM. The BOM originates from a Solidworks Assembly. The BOM must originate from there due to the necessary link to Item Numbers in Drawings.... Long story.

       

      We have worked for months build a robust and stable method to extract this BOM with zero luck. Our VAR does not dabble in API automation so no luck there.

       

      We are currently utilizing xml extracts on workflow transitions but that is only successful about 60% of the time and does not work at all if the assembly is checked out. (I would like the previous version.)

       

      We have looked at the sample code but when we went down that track the only way we could make it work was to have ePDM extract each cell of each row one at a time. This would be fine as well but we were forced to extract the ENTIRE table for each cell. This was taking 45 minutes+ per BOM!

       

      Can anyone give us a way to do this that is reliable, stable and robust? It needs to work on a 300-ish row with about 20 columns BOM in less than a minute. This BOM originates from Solidworks.

       

      We are running Solidworks and ePDM 2015.

       

      All I am looking for is a general direction. We are fully capable of taking the ball and running, the problem we have is we do not know anything about the ball or direction to run! Your assistance would be greatly appreciated.

        • Re: best method to extract BOM from ePDM?
          Jim Sculley

          When you extract it what do you need to do with it?  I wrote an add-in to allow on-demand printing of BOMs (as an Excel spreadsheet) by right clicking a drawing, it's associated assembly file or an associated PDF file.  If you can explain what you want (end to end) it will be easier to provide assistance.

           

          Jim S.

            • Re: best method to extract BOM from ePDM?
              Drew Wiggins

              Hi Jim,

               

              We are importing into a database for scrubbing against business rules, but these are separate process entities.  For the extract, all that occurs is extracting into a database.  We know that EPDM does this already, however there isn't a means to correlate a given bom extract (assume this happens multiple times a day for each assembly) for those values with a specific version and state of the file, without running into concurrency issues.  The entire transaction needs to be, well, transactional, with a bom extract tieing to a batch number, tieing to a document, it's version and state at the time of the extract, etc.

               

              Thanks for your help.

              - Drew (& Danny)

              • Re: best method to extract BOM from ePDM?
                Drew Wiggins

                Also, for reference: the initial method we used was to obtain an IEdmBomView pointer, and iterate over the rows and columns with GetVar.  What we discovered was that EPDM extracts the entire xml into a temp directory, and cleans up for each call to GetVar.  For a BOM table with 75 entries/rows spanning 20+ columns - this was taking ~4 minutes; which isn't feasible for the application needs.  We can do everything we need on a data-level with the XML in 5 seconds or less.

                 

                We found that we can extract the BOM as XML once (or as-needed), with transitions.  However, now we are seeing that the bom xml doesn't always get generated.  If the bom isn't activated (using the BOM view UI), or if the bom is checked-out (so no state transitions can occur).  We have not found an API that activates the BOM, programmatically.

                • Re: best method to extract BOM from ePDM?
                  Danny Bradford

                  Greetings Jim,

                   

                  I do hope you will be able to assist. I just cant believe that this is not possible simply because I know that ERP systems like SAP are supported by ePDM extracts. Surely they are not functioning at a 60% success rate.

                   

                  At a barebones view, we are looking to create a script that can be called programmatically. When called we feed the Solidworks Assembly File and the script return the BOM information stored. We would prefer that no user be involved in the effort directly, but if we had a reliable right click that the user could perform interactively with ePDM we would certainly take it as an improvement over what we have now.

                   

                  This is a general view just to ensure we do not eliminate any options which we have not thought of. The BOM data returned could be in any form, we just need to be able to access it and pull it into our SQL table for further use.

                   

                   

                  End to End view:

                   

                  User creates 3D with BOM information

                  User launches Check of EBOM and 3D

                  **BOM extracted for checking (preferably by the system)

                  User creates Drawing

                  User Launches Check Cycle for Drawing and 3D

                  **System extracts core Solidworks BOM as the basis to build the final EBOM (User support if necessary)

                  PDF is released with signatures

                   

                  **These are the parts that we struggle mightily with.

                   

                  Thank you in advance for your time,

                   

                  Danny Bradford

                    • Re: best method to extract BOM from ePDM?
                      Jim Sculley

                      When you say:

                       

                      "feed the Solidworks Assembly File and the script return the BOM information stored"

                       

                      Does the assembly file contain a SolidWorks BOM table?  Or are you expecting the script to traverse the assembly and determine what the contents of the BOM should be?

                       

                      The user does not necessarily have to be involved in the extraction process.  If it is acceptable to get the information when a file enters a particular EPDM state, you can use an EPDM add-in to watch for files entering that state and then get the information.

                       

                      Looking at your end to end view there are still some parts that are not clear:

                       

                      User creates 3D with BOM information

                      Once again, is this a 3D assembly model with a BOM table in it?

                       

                      User launches Check of EBOM and 3D

                      Is this an EPDM transition?

                      **BOM extracted for checking (preferably by the system)

                      User creates Drawing

                      Is there a reason why the BOM extraction occurs before the user has created a drawing?  Could the extraction happen after the drawing (with a BOM table on it) has been created?

                       

                      User Launches Check Cycle for Drawing and 3D

                      Is this an EPDM transition?

                       

                      **System extracts core Solidworks BOM as the basis to build the final EBOM (User support if necessary)

                      PDF is released with signatures

                      Where is this BOM extracted from?  The drawing or the model?  Is it extracted from an actual BOM table?  If there is a BOM in both places, which one is the 'real' BOM?

                       

                      In Drew's second reply to me, he talks about activating BOMs, which is normally associated with named BOMs, not SolidWorks BOMs.  Are you working with named BOMs and SW BOMs?  Can you work exclusively with SolidWorks BOMs?

                       

                       

                      I know this is more questions than answers, but the devil is in the details.

                       

                      Jim S.

                        • Re: best method to extract BOM from ePDM?
                          Danny Bradford

                          Greetings Jim,

                           

                          Here are your questions answered:

                           

                          Does the assembly file contain a SolidWorks BOM table?

                                  We have a Solidworks Assembly with the BOM (Actually 2 of them) stored within.

                           

                          Is this an EPDM transition?

                                  We would prefer it not to be but we have incorporated a workflow state change. We have an separate tool that does the checking and other tasks. Optimally the separate tool calls an API that returns the BOM data as required with no workflow, but as I said we have made it work with a workflow change and can continue to do so.

                           

                          Is there a reason why the BOM extraction occurs before the user has created a drawing?  Could the extraction happen after the drawing (with a BOM table on it) has been created?

                                   This needs to happen on the assembly file without a drawing. We really want to get the BOM data out for check prior to drawing start.

                           

                          Is this an EPDM transition? (2nd question)

                                   same answer as above. No workflow would be optimum but we can make that work.

                           

                          Thank you very much for the questions I appreciate it. If it gets us to a resolution I will take 100 more!

                           

                          I believe I have answered the questions, please reask if I am unclear. The Solidworks assembly stored BOMs are the gospel and that is the gold we are digging for.