Topic
5 replies Latest Post - ‏2013-06-19T07:43:24Z by Dragos.Cojocari
Sascha165
Sascha165
7 Posts
ACCEPTED ANSWER

Pinned topic Transfer internal variable via post-command

‏2013-06-12T13:32:51Z |

Hello,

using RPE 1.1.2.2 we try to transfer variable values into MS word properties via the post-command feature.

Following the help system I use the following command line:
cmd /c cscript "RPE_HOME\utils\word\runmacro.vbs" "${Word}" Makroname "${varA}"

After several tries we figured out the that the term "${varA}" only works for variables defined as external. The very same script does not work after changing the variable type to internal. Now the question: How to get it to work for internal variables?

Best regards,

Sascha

 

Updated on 2013-06-12T13:34:37Z at 2013-06-12T13:34:37Z by Sascha165
  • Dragos.Cojocari
    Dragos.Cojocari
    1606 Posts
    ACCEPTED ANSWER

    Re: Transfer internal variable via post-command

    ‏2013-06-12T18:12:09Z  in response to Sascha165

    Hey Sascha,

     

    you can't. Internal variables are not visible outside the template including post command. You need to use an external variable for this. And you can always use an external variable and have it assigned the value of the internal variable right before the template's end.

    but I'd like to understand more your scenario and why you need to expose an internal variable.

     

    Regards,

         Dragos

    • Sascha165
      Sascha165
      7 Posts
      ACCEPTED ANSWER

      Re: Transfer internal variable via post-command

      ‏2013-06-14T07:05:25Z  in response to Dragos.Cojocari

      Hello Dragos,

      the idea is to use the post command, for filling property values in a MS Word file, e.g. doc version, doc title and so on. This way we can continue to use one basic template (cover sheet, header, footer) for reporting from different reporting tools (e.g. DOORS DXL is still widely used). I know I can do it completely fron within RPE but the reason behind is commonality.

      Why internal? Well, the first attempt was to do it completely inside RPE. There I have about 25 varibales, assign the project data to them and place them in the header, footer and so on. All internally, so the template executioner does not see what happens behind the curtain. We ask them to store the relevant data in the (Rhapsody) project anyway.

      Now I have to change them all to external to use them with the post command. No big deal, but now all this external variables are visible in the specification part, where I intended to place just a view switches to select the relevant parts for the report to be generated.

       

      Best Regards,

      Sascha

      • Dragos.Cojocari
        Dragos.Cojocari
        1606 Posts
        ACCEPTED ANSWER

        Re: Transfer internal variable via post-command

        ‏2013-06-18T10:54:17Z  in response to Sascha165

        Hey Sascha,

        thanks for the details.

        >>> the idea is to use the post command, for filling property values in a MS Word file, e.g. doc version, doc title and so on. I know I can do it completely from within RPE but the reason behind is commonality.

        RPE 1.2 allows you to set the properties from within the template and that is independent of data source so I'm not sure what you mean by  "the reason behind is commonality". And by setting these properties through the new template elements you achieve the same goal ( the properties are set) and you keep the docspec clean and simple as you do not have to expose lots of variables.

        >>> No big deal, but now all this external variables are visible in the specification part, where I intended to place just a view switches to select the relevant parts for the report to be generated.

        I see what you mean but only using visible (external)  variables  is the right way. Making this work with variables not visible in the docspec would make the docspecs difficult to understand by anyone who is not also familiar with template. And even for those persons it might be confusing.

         

        Regards,

            Dragos

        • Sascha165
          Sascha165
          7 Posts
          ACCEPTED ANSWER

          Re: Transfer internal variable via post-command

          ‏2013-06-18T12:05:35Z  in response to Dragos.Cojocari

          Hello Dragos,

          I would like to move to RPE 1.2 but as far as I understand, the templates are not usable from within Rhasody today. So for now I have to stick with 1.1.2.2 and the usage of variables. Did this change with the latest version (8.0.3)?

          Regards,

          Sascha

          • Dragos.Cojocari
            Dragos.Cojocari
            1606 Posts
            ACCEPTED ANSWER

            Re: Transfer internal variable via post-command

            ‏2013-06-19T07:43:24Z  in response to Sascha165

            Hey Sascha,

             

            RPE 1.2 can produce templates for 1.1.2.2 and older which can be used within Rhapsody and other tools embedding RRDG (see RRDG vs RPE) by selecting the version 1 template ( see Template versions ) . However setting properties inside the template requires a version 2 template so you would  not be able to use them in a template that can be run from a Rhapsody version that bundles RRDG 1.1.2.2.

             

            >>> Did this change with the latest version (8.0.3)?

            Let me check this.

             

            Regards,

                Dragos