4 Replies Latest reply on Nov 25, 2014 10:56 AM by Jeremiah Davis

    Convert task-Menu

    James Guilford

      Hi All,

       

      I'm using built in convert task to generate PDF and Step Files, However, I was wondering if it would be possible to do both at one instance. For example the procedure right now is to right click on each file and then select convert to PDF/ or Convert to STEP. Would it be a way that when the user right clicks on the file, I get something like "Convert to PDF and Step or create purchasing package" and does both in one step, instead of me selecting each every time???

      Thanks,

        • Re: Convert task-Menu
          Brian Titus

          You can do this but you will need a little experience writing macros.  You can create a CUSTOM TASK and use a macro.

          I would sugggest looking at the existing framework for the CONVERT task.  Under Output File Details select the ADVANCED SCRIPTING options to get a look at the VBA Code behind the function:

          2014-10-07_22-38-12.bmp

          2014-10-07_22-44-52.bmp

            • Re: Convert task-Menu
              James Guilford

              Hi Brian,

               

              Thanks for your reply. I looked through the code, but I could not locate the part that takes the "Menu Command" argument in.

               

              For instance, if the user selects "Create PDF and Step" when right clicked on a file, then this would be passed to the appropriate functions.

               

              Any suggestions?

               

               

              Thanks,

               

              JG

                • Re: Convert task-Menu
                  Brian Titus

                  If you take a look at the SUB MAIN() procedure.  There is a call that says:

                   

                  docFilename = "<filepath>"

                   

                  This essentially grabs the full filename from selected file for processing.

                  Remember this is just a framework to look at.  Your macro will most like be much simpler and have two conversions (SAVEAS) to get what you want.

                  • Re: Convert task-Menu
                    Jeremiah Davis

                    Hello James,

                     

                    Instead of modifying the existing convert task to run twice and convert once as PDF and a second time as STP, it might be easier to create your own task by writing the appropriate macro in SOLIDWORKS, modifying it for a task and creating it as a standard task in EPDM. This option would allow a much quicker and easier way of accomplishing this rather than trying to read through hundreds of lines of code to attempt to find the ones to modify.