4 Replies Latest reply on May 15, 2017 2:08 PM by Rick Lacouture

    Dispatch to apply a variable value from one file to another file?

    Keith Schultz

      We want to take a variable value stored in the data card of one file and apply it to other files within the same immediate directory using a Dispatch - Administrative Action.  Using "set card variables" we are able to apply the variable value to the parent folder data card and to another file by using '%CurrentFolderPath%\target file name.doc' (the "target file name" must be exact); however we cannot figure out how to apply this to any other file in the folder without identifying its complete path with file name.


      Is there a way to apply this to any file in the current folder location?  It is unclear if a wildcard can be used to apply this to anthing in that immediate path, or if we know part of the file name.  Everything we have tried returns an error like this "error, file CurrentFolderPath\*.doc doesn't exist" where CurrentFolderPath\*.doc is the path we specify.

       

      If not, is there another way to accomplish this?

        • Re: Dispatch to apply a variable value from one file to another file?
          Kees Kuijt

          Hi Keith,

           

          Have you considered using "For all files" control logic. This logic loops the commands to all selected files.

           

          How did you read the variable from one file and applied to another?

          My problem is that I need to copy a DWG and PDF to the vault and the datacard of the PDF needs to be filled with the information from the DWG.

           

          Greet,

          Kees

            • Re: Dispatch to apply a variable value from one file to another file?
              Tim Read

              Hi Kees,

               

              If the DWG file has variables on the datacard then you can read those datacard variables to variables in a Dispatch Script. Then you can set those variables to the datacard of the pdf.

               

              You need to supply the full path and filename to the pdf that you want to set the datacard variables to. I do this by extracting the information from the original file name (in your case the DWG file) and based on naming rules I can determine the pdf filename.

               

              If you are adding both the DWG and the pdf files at the same time then you will need to use some logic in the Dispatch script.

               

              Groetjes,

              Tim

            • Re: Dispatch to apply a variable value from one file to another file?
              Derek Lawson

              You said that you applied the variable value from the file card to the folder card, correct? Now you want that value to go to multiple file cards inside of that folder? If this is what you are looking for, you can use the update variable tool inside of the vault view. When that folder has the correct variable value in it's folder card, select the folder and choose "Modify" > "Update" > "Values in Files". You will then be taken through an update wizard that allows you to choose the variable from the data card and push it to the file cards in that folder. It offers a lot of control so you can select specific files in certain states if you'd like. No dispatch needed. I am using EPDM 2012 and I can't remember if this function was available prior to that. Hope this helps!

              • Re: Dispatch to apply a variable value from one file to another file?
                Rick Lacouture

                Has anyone created this Dispatch task successfully? I'm trying to do the same thing, but am running into a road block when trying to pass the values from a DWG data card to a PDF data card.

                 

                There are really only three variables I care about: Drawing Number, Revision, and Description.

                The PDFs were migrated in without these properties populated. Now there is a need to see the description for searching.