Importing from the command-line interface is useful when you want to import files automatically, e.g., once a day at midnight.
To import a ReqIF file from the command-line interface
reqifimport project_descriptor=<project URL> reqif_file=<path to ReqIF file> owner=<element hyperlink or qualified name>
Where:
project_descriptor is the URL of a project.
|
reqif_file is the path to the ReqIF file you want to import.
If there is a space in a path, surround the argument and its value with escaped quote (\"). |
owner is the hyperlink or qualified name of the owner element. If newly imported elements are not contained by the Specification element, they are placed under the specified owner. Note that the owner argument is optional.
The hyperlink of the element is now copied to the clipboard. |
Press Enter.
Now after opening the project you have imported the ReqIF file into, the imported data is already present in the Containment tree of the project.
To make importing from the command-line interface quicker you can specify arguments in a properties file, which can be easily edited or reused.
To import a ReqIF file from the command-line interface using a properties file
See the example of a properties file below.
project_descriptor=file:/C:/Users/johnsmith/Downloads/MagicDraw_190/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.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 (\"). # owner=mdel://eee_1045467100313_135436_1 # # Specify the hyperlink or qualified name of the owner element. # To get the hyperlink of an element, open a project, right-click the element in the Containment tree and select "Copy Element Hyperlink". # 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. |
At the command prompt, type the following command and specify the value of the properties_file argument.
reqifimport properties_file=<path to properties file>
Where properties_file is the path to the properties file to be used.
Now after opening the project you have imported the ReqIF file into, the imported data is already present in the Containment tree of the project.