7 Replies Latest reply on Mar 15, 2015 10:27 PM by Bill Florac

    Compare active document and document from Vault

    Chris Champions

      Is there a API call to compare active document and the document from Vault

      Thank you

        • Re: Compare active document and document from Vault
          Matt Martens

          Are you using ePDM or WorkgroupPDM?

          • Re: Compare active document and document from Vault
            Bill Florac

            Date is not that reliable. Use the UpdateStamp property from the vault and compare it to the file. This is only an indicator that something of "substance" has change. I have never found a list of things that fall into or outside of this category but it does serve as a good indicator that the two files are not the same. I actually use a combination of the two just warn the user and let them decide what action should be taken.

              • Re: Compare active document and document from Vault
                Chris Champions

                Thank you, Bill

                 

                According to the API online help:

                 

                Gets the date on which this document was last updated.

                The update stamp is an integer representing the time stamp. The update stamp in a SolidWorks document is incremented when:

                •the state of the model changes (for example, you suppress or unsuppress a feature in a part or an assembly)

                •the geometry changes (for example, any action that requires a rebuild)

                This time stamp is not incremented for such operations as color changes, feature or configuration name changes, and so on.

                 

                I think it's good idea to use UpdateStamp on local document compared to the same one from the Vault with DateModified

                  • Re: Compare active document and document from Vault
                    Bill Florac

                    And yet,  I have seen the update stamp change by doing nothing more than putting the file in the vault. It also does NOT change if any properties such as part number/description are modified. But, as I stated before, it is darn good indicator. Date generally works (as a backup) except that SW likes to update all the components of an assembly even if they did not changes.  This typically will not change their update stamp (but not alway) but it will change their file date/time.