Export Requirements to ReqIF Files
You can export requirements and links from Requirements Toolbox™ to third-party requirement management tools that support data exchange through the Requirements Interchange Format (ReqIF™) by exporting to ReqIF files. You can choose the properties, stereotype properties, and custom attributes to include in the exported ReqIF file. You can also filter the requirements and links that export by creating a filtered view in the Requirements Editor.
When you export links that point to items that are not in the requirement set, Requirements Toolbox inserts proxy objects in the ReqIF file to prevent the links from breaking.
Choose an Export Mapping
When you export requirements and links to ReqIF files, you must choose an export mapping that maps the requirement and link data to ReqIF requirement and link data. Requirements Toolbox includes export mappings for these third-party tools:
IBM DOORS Next
Requirements Toolbox also includes a generic mapping, which you can use if there is no export mapping for your third-party tool.
Choosing an export mapping is important if you need to do a ReqIF round-trip, which is when you import a ReqIF file, edit the requirements, and export them back to a ReqIF file. When you export requirements during a ReqIF round-trip, you can avoid unexpected behavior by using either:
The same mapping for import and export
The generic mapping for export
For more information about ReqIF round-trips, see Round-Trip Importing and Exporting for ReqIF Files.
Export Requirement and Link Types
The attribute mapping that you use affects how Requirements Toolbox exports the requirement and link type names to the ReqIF file.
During a ReqIF round-trip, if you re-use the same attribute mapping that you used for the import, the exported ReqIF requirement type names and link type names revert to the values from the original ReqIF file.
When you export a requirement set and its links using the generic mapping, Requirements Toolbox sets the exported requirement and link type name differently depending on if you use a built-in type, a custom requirement type, or a stereotype.
|Requirements Toolbox Type
|Exported ReqIF Type Name
Built-in requirement type:
Built-in link type:
|Custom requirement or link type defined in
sl_customization file. See Define Custom Requirement and Link Types by Using sl_customization Files.
|Custom requirement or link type name
|Stereotype defined in profile. See Customize Requirements and Links by Using Stereotypes.
You can export a single requirement set or a single Import node. Additionally, if you authored the requirements in Requirements Toolbox, you can export a single requirement, which also exports its parent and child requirements to maintain the requirement hierarchy.
In the Requirements Editor, select the requirement set, Import node, or requirement that you want to export.
Click Export > ReqIF.
In the Export Requirement Set to ReqIF dialog, set Export mapping for attributes and types to the attribute mapping for your third-party tool or
Generic. For more information, see Choose an Export Mapping.
Under Filter Attributes, use the Add and Remove buttons to specify which properties and custom attributes to include in the ReqIF file.
Under Additional contents to export, select Export links to include links in the exported ReqIF, or clear the selection to omit links. For more information about exporting links, see Export Links.
Output file shows the file path and name for the exported ReqIF file. To edit the file path or name, click Browse and save the file path and name by clicking Save.
Export the ReqIF file by clicking Export.
Requirements Toolbox does not export link properties, link custom attributes, or link stereotype properties other than the link type name.
To export only the properties and custom attributes in the current Requirements Editor view, select Include attributes from current view columns. For more information about displaying additional columns, see Display Additional Columns.
To export a subset of the requirements and links, create a view that filters based on requirement and link metadata and apply the view in the Requirements Editor. For more information about views, see Configure Views in the Requirements Editor.
If a child requirement meets the filtered view criteria but its parent requirement does not, the Requirements Editor displays the parent requirement to retain the hierarchy. However, when you export the requirements, the ReqIF file does not include the parent requirements that do not meet the filtered criteria.
Programmatically Export Requirements
To programmatically export requirements:
For example, this code loads and returns the handle for a requirement set called
myReqSet = slreq.load("myReqSet");
ExportOptionsobject and specify the:
Name of the exported file
Option to export links
Attributes to export
For example, this code creates an
ExportOptionsobject that names the exported ReqIF file
myReqIF.reqif, uses the generic template, exports links, and only exports the
exportOptions = slreq.export.ExportOptions( ... OutputFile="myReqIF.reqif",Template="Generic", ... IncludeLinks=true,Attributes=["Summary","Type","Description"]);
Export the requirements and links by using the
For example, this code exports the requirement set for
myReqSetusing the export options in
dir = slreq.export(myReqSet,exportOptions);
To filter the exported requirements and links, create a filtered view
by using the
create function, then pass the view as an input to the
ExportOptions creation function by using the
If your requirements have links, you can export them when you export the requirements to a ReqIF file.
If you link a requirement in Requirements Toolbox to an item that is not contained in the requirement set, such as a Simulink® block or a requirement in a different requirement set, and then export the requirement and associated links to a ReqIF file, Requirements Toolbox inserts a link proxy object into the ReqIF file for the linked item. This table shows the generated link proxy object type name for the linked objects:
|Link Proxy Object Type Name
Simulink Test Object
MATLAB Code Range
Web browser URL
Simulink data dictionary entry
Requirements Toolbox Object
|All other items
The exported link proxy objects have persistent IDs that the third-party tools can use to avoid duplicating the proxy objects. Duplication may occur if different ReqIF files contain links from the same MATLAB or Simulink object.
If you re-import a ReqIF file to Requirements Toolbox that has link proxy objects, the software reconstructs the links that
relate the proxy objects and requirements for proxy objects that have types other than
Requirement. For more information, see Import Links from ReqIF Files Generated by Requirements Toolbox.