5 Replies Latest reply: May 15, 2014 9:53 AM by Grant Perkins RSS

    Script

    OJGraf _

      I try to automize a script (MS Jetengine).

      [font="courier"] "C:Program FilesMonarchProgrammonarch.exe" "W:...1.xprj" /exp: "W:file.xls" /s

      "C:Program FilesMonarchProgrammonarch.exe" "W:...2.xprj" /exp: "W:file.xls" /s[/font][/quote]I use Monarch Pro8. The script has 2 projects. But when I start it, only one project is exported in my file.

      The second project should export in the same excel filie by adding the cells. What can I do?

       

      Kind Regards

      Oli

        • Script
          Data Kruncher

          Oli,

           

          Add "/exptableopt:append", without the quotes, to the command line for 2.xprj.

           

          Please note that this is for the v8 Pro only. Per the online help, the parameter for V8 Standard is "/expfileopt:add".

           

          I haven't tried it yet myself. Let us know how you make out.

           

          Kruncher

          • Script
            Oli _

            Hi,

            that doesn't help. The datas get overwritten by the last project. Is theres another chance ?

             

            greetings

            Oli

            • Script
              Grant Perkins

              Oli,

               

              I notice that you seem to be using a Project and also specifying an output file in the script. Have you use the Project Export facility in the Project(s)?

               

              Project Exports should allow you to define what the export should do - what file it should create or if the file already exists whether the current export should append to what exists or overwrite it. (Or abort!)

               

              Is there something about your process requirement that makes the use of Project Exports impossible or causes it to fail?

               

              Grant

              • Script
                Oli _

                Grant,

                no I haven't used the Project Export facility. Do I have to use it with Monarch 8 Pro?

                 

                I work in different steps.

                -


                Example:

                1. Start Project1 -> create file: a.xls (via script-export: /exp:)

                2. Start Project2:

                Within this Project the a.xls is used as a lookupfile. create file b.txt

                3. Start Project3:

                Within this Project there are further calculation and subtotals which ends in the final file c.xls

                -


                 

                Up to now I tried to use some kind of script as you can see in my posting above. I think there is the MS Jetengine used. But this isn't working very reliable. If I change some the "base"- files for the Projects/Models there will not happen a reliable update.

                 

                To come to a conclusion:

                Can I use the "Project Exports" for the above shown project?

                How can I combine the different setps, is it possible within one Project?

                 

                Thanks for your help in advance.

                 

                Oli

                • Script
                  Grant Perkins

                  Originally posted by Oli:

                  Grant,

                  no I haven't used the Project Export facility. Do I have to use it with Monarch 8 Pro?

                   

                  /quoteHi Oli,

                   

                  No you don't have to use Project Export but there may be some benefit of control by using the facility. In effect you can define the exports to file name at location and, if appropriate for the type of file, the table name in the output file as well.

                   

                  I think you would still need the 3 stages and 3 projects in your command line script but the command lines would be simpler.

                   

                  The main question when deciding whether to use the project export facility or a command line script to specify the file output parameters is "Is this a fixed process or a changeable process?" If it is changeable the next question would be - "Where is it best to maintain changes - in the Project file or in a script?"

                   

                  I think if the process is fixed the Project Script makes the best source.

                   

                  If there are constant changes perhaps the Script is more useful.

                   

                  If you need something under user control and have multiple users then I guess it would need some sort of script or program to prompt for ser input and then respond accordingly.

                   

                  Finally I think the problem you have above is that the "/exptableopt:append" should be  "/exptableopt:add" but I will add that I do not have much requirement to automate via scripts and use the Project Export 100% anyway so this suggestion is not from experience and there is a good chance that I have missed something important in my reading and understanding!

                   

                  Things to think about.

                   

                  Grant