2 Replies Latest reply on Jul 27, 2018 2:33 AM by Patrick Reinke

    export PDM Documents

    Patrick Reinke

      Greetings to everybody,

       

      I am wondering if I can start a PackAndGo from Documents coming from PDM.

       

      In other words, I wanna export an assembly with all existing reference documents from PDM to a local folder.

       

      Naive how I am, I allready tryed this:

       

      public ModelDoc2 convertPDMDocToSWDoc(PDMWDocument document)

      {

      ModelDoc2 swDoc = (ModelDoc2) document;

      return ModelDoc2

      {

       

      But it doesn't work.

       

      Is there another way to export an assembly with all the reference documents?

       

      Regards

      Patrick Reinke

       

        • Re: export PDM Documents
          Michael Dekoning

          Not sure what you are trying to accomplish using the API. PDM already has a Copy Tree function which will allow you to save the files to a location outside the vault.

            • Re: export PDM Documents
              Patrick Reinke

              Hi Micheal,

               

              thanks for your Reply!

               

              Do you mean the function document.save(filepath) ? It saves only this document but not the child documents (references).
              I could iterate through the hole tree and doing the save function on all the references, but before this I want to check if there could be a much more easy way.

               

              @ Christian Chu

              We are doing a migration to another PDM-System and we want to migrate all the Revision documents also. And we dont want to migrate file file by hirering a worker only to do the PackAndGo manually. This could take a long time.

               

              Thats why I am searching an automated solution... but I think Micheal Suggestion is the only possible way... if I understood him correct.

               

              Regards

              Patrick Reinke

            • Re: export PDM Documents
              Christian Chu

              Patrick Reinke wrote:

               

              Greetings to everybody,

               

              I am wondering if I can start a PackAndGo from Documents coming from PDM.

               

              In other words, I wanna export an assembly with all existing reference documents from PDM to a local folder.

               

              Naive how I am, I allready tryed this:

               

              public ModelDoc2 convertPDMDocToSWDoc(PDMWDocument document)

              {

              ModelDoc2 swDoc = (ModelDoc2) document;

              return ModelDoc2

              {

               

              But it doesn't work.

               

              Is there another way to export an assembly with all the reference documents?

               

              Regards

              Patrick Reinke

               

              You don't need a macro for this task. Just run the SW build-in PackNGo from a document in your VaultView to any different folder in your local drive or server (all ref. file should be included when you run PackNGo)