5 Replies Latest reply on Jul 26, 2013 8:04 AM by Ron McCarry

    Data Card Variables/Values in SQL/XML/???

    Caleb Keller

      Hey all, I am extremely new to the world of Solidworks and Enterprise PDM. I have been digging through the server that backs our pdm installation and haven't come across a location where the information from the data cards is written. So my questions are thus:

      • Does EPDM write the data card values to it's database?
      • If it does, what is the default location?
      • If it doesn't where are these values stored?

       

      Thanks!

        • Re: Data Card Variables/Values in SQL/XML/???
          Brian Dalton

          Yes, it writes the values to the Db.

           

          The Variables table holds the definitions of all defined variables.

           

          The VariableValues table holds the actual value of each variable for each document.

           

          To specify a particular piece of data you must specify the Variable (by VariableID), the Document (by DocumentID) and the version.

           

          That's the basics... beyond that it's just a lot of poking around using SSMS to learn what needs to be learned.

          • Re: Data Card Variables/Values in SQL/XML/???
            Ron McCarry

            An alternative to poking around in the server using SQL, I use the EPDM API and .NET or VBA. The data structures are not documented and can change from version to version. API call will continue to work though each upgrade. The API help file should be at "C:\Program Files\SolidWorks Enterprise PDM\API_GB.chm". It's not to hard once you get used to it.

             

            PS: the Solidworks API help file should be at "C:\Program Files\SolidWorks Corp\SolidWorks\api\sldworksapi.chm"

              • Re: Data Card Variables/Values in SQL/XML/???
                Brian Dalton

                Good points, Ron, though significant changes to database structures are very difficult to implement and support for existing installations (and generally considered a very bad practice) so the Db is not likely to change much from version to version.

                 

                A particularly important point is that while reading variables from the Db is fine, writing to them is not allowed by the SW service agreement.  All changes to any data in EPDM must be done either through the interface or the EPDM API.

                 

                I typically use Db access for snooping out problems and writing reports.  Nothing like SSMS for finding out what's really happening behind the scenes.

              • Re: Data Card Variables/Values in SQL/XML/???
                Caleb Keller

                Thanks to the both of you. I was able to find what I need, documents ID's link to variables and variables to variable values. We are looking at going both ways in and out of EPDM with out internally developed ERP software.  I will start looking more into the API, I was just doing some initial digging into what info was available.  Most of our system are programmed on some sort of .NET, so that sounds promising. We want to create data card fields that are drop-downs, validated against other internal databases. Then read those back associated with a part number.

                 

                Next, I am trying to reconstruct the file path, any tips there?

                 

                Caleb

                  • Re: Data Card Variables/Values in SQL/XML/???
                    Ron McCarry

                    I have implemented 2 .NET EPDM add-ons placing a button of a data card to copy Job and Part information from our ERP software. Solidworks has an EPDM Add-on template for Visual Studio. One thing I did not understand at 1st, was although the add-on is installed on the server; it is downloaded to the workstation and runs within the EPDM/Explore address space. To test a revision, the Explore task has to be stopped are restarted inorder to reload the add-on.