Page tree

Cameo Requirements Modeler Plugin 19.0 LTR SP3 Documentation


Exporting from the command-line interface is useful when you want to export files automatically, e.g., once a day at midnight.

 

To export a ReqIF file from the command-line interface


  1. Open the Command Prompt window
  2. Go to the <model editor installation directory>/plugins/com.nomagic.requirements directory containing the reqifexport.exe file.
  3. At the command prompt, type the following command and specify the values of the required arguments:
    reqifexport project_descriptor=<project URL> reqif_file=<path to ReqIF file> export_type=<specifications|elements> elements=
    <hyperlinks or qualified names of elements> source_tool_id=<ReqIF flavor>

    Where:

    • project_descriptor is the URL of a project.

       How to get a project descriptor?
      1. Start your modeling tool and open the required project.
      2. In the main menu, go to File > Project Properties and select the General tab.
      3. Find the project descriptor specified in the Project Descriptor box at the bottom of the Project Properties dialog and copy it to the clipboard.
    • reqif_file is the path to the ReqIF file you want to export.

      If there is a space in a path, surround the argument and its value with escaped quote (\").

    • export_type is the type of exported data. The valid value of this argument:
       

        • elements - if you want to export the plain list of requirements.

        • specifications - if you want to export requirements and hierarchical relationships between them.

           

    • elements are hyperlinks or qualified names (or the combination  of both) of the elements to be exported. They must be separated by semicolon (;) symbols.

       How to get the hyperlink of an element?
      1. Start your modeling tool and open the required project.
      2. In the Containment tree, right-click an element and select Copy Element Hyperlink.

      The hyperlink of the element is now copied to the clipboard.

      If you want to export Specifications, make sure you specify packages with the «Specification» stereotype applied. To apply the stereotype, your project has to use the ReqIF Profile. if you try to export packages that don't have the «Specification» stereotype, the command will fail.

    • source_tool_id is the flavor of the ReqIF file. Currently supported flavors are MagicDraw, IBM Rational DOORS, Polarion, Teamcenter and Reqtify. Note that the source_tool_id argument is optional.

  4. Press Enter.

The ReqIF file with the desired data is now exported to the specified directory.
 

Using a properties file

To make exporting from the command-line interface quicker you can specify arguments in a properties file, which can be easily edited or reused.

 

To export a ReqIF file from the command-line interface using a properties file


  1. Create a properties file and specify the values of the following arguments:
    • project_descriptor
    • reqif_file
    • export_type
    • elements
    • source_tool_id
       

    See the example of a properties file below.

    project_descriptor=file:/C:/Users/johnsmith/Downloads/MagicDraw_185/samples/requirements/MagicLibrary%20requirements.mdzip
    #
    # Specify the project URL.
    # To get a project descriptor, open a project and in the main menu go to File > Project Properties > General.
    #
    reqif_file=C:/Users/johnsmith/Documents/Project_Requirements/project_requirements.reqif
    #
    # Specify the path to the ReqIF file.
    # NOTE: If there is a space in a path, surround the argument and its value with escaped quote (\").
    #
    export_type=elements
    #
    # Specify the type of exported data. The value of the argument can be "specifications" or "elements".
    #
    elements=mdel://_17_0_2_8f90291_1308667744583_445317_24132;mdel://_17_0_2_8f90291_1308667618344_111153_24071
    #
    # Specify the hyperlinks or qualified names (or the combination  of both) of the elements to be exported.
    # To get the hyperlink of an element, open a project, right-click the element in the Containment tree and select "Copy Element Hyperlink".
    #
    source_tool_id=MagicDraw
    #
    # Specify the flavor of the ReqIF file. Supported flavors are: "MagicDraw", "IBM Rational DOORS", "Polarion", "Teamcenter" and "Reqtify".
    # NOTE: This argument is optional.
    #

    When creating a properties file on Windows OS, use only / or \\ as a path separator, otherwise the command will fail.

  2. Open the Command Prompt window.
  3. Go to the <model editor installation directory>/plugins/com.nomagic.requirements directory containing the reqifexport.exe file.
  4. At the command prompt, type the following command and specify the value of the properties_file argument.

    reqifexport properties_file=<path to properties file>

    Where properties_file is the path to the properties file to be used.

  5. Press Enter.

The ReqIF file with the desired data is now exported to the specified directory.

 

  • No labels