This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Import Requirements from Third-Party Tools

Using the Requirements Editor in Simulink® Requirements™, you can work with requirements from third-party applications such as Microsoft® Word, Microsoft Excel®, IBM® Rational® DOORS® and other requirements management applications through Requirements Interchange Format (ReqIF) files.

Import requirements from external documents by using the Document Import dialog box. In the Requirements Editor, select File > Import to open the Document Import dialog box. If you want to import requirements from a file that is not present on the MATLAB® path, you can choose to:

  • Store the relative path for the currently running instance of MATLAB,

  • Add the parent folder of the requirements document to the MATLAB path, or

  • Update the Simulink Requirements path preference to always use the relative path. For more information on requirements document path preference, see Document Path Storage.

The Import operation does not import any requirement link information.

Import Requirements from Microsoft Office Documents

Open the Document Import dialog box and select the document type in the Source document pane. You can choose to use the currently open document or to select a different document by clicking Browse.

Note

If you choose to use the currently open document and have more than one document open, the most recently opened document is selected for import.

Import Options for Microsoft Word Documents

You can import requirements in plain and rich text formats from Microsoft Word documents. Use the rich text format to import requirements content such as graphics and tables.

By default, imported requirements content matches the Microsoft Word document outline of section headings. You can also import requirements selectively by using the following qualifiers from the Requirement Identification menu:

  • Predefined bookmarks in Microsoft Word to identify items and to serve as custom IDs. It is recommended to use bookmarks as requirement Custom IDs as they are persistently stored in the document and cannot be duplicated.

  • Regular expression search patterns to identify items by occurrence. See Regular Expressions (MATLAB).

  • You can choose to ignore outline numbers in the section headers of your Microsoft Word document. If you import requirements as references, it is recommended to ignore outline numbers to prevent issues with the Update process.

Note

If you do not have images in your requirements document, consider importing your requirements as plain text to prevent some issues related to font, style, or whitespace differences.

Import Options for Microsoft Excel Spreadsheets

You can import requirements in plain and rich text formats from Microsoft Excel spreadsheets. The plain text format imports only text and associates each column of your spreadsheet to a requirement property. The rich text format imports graphics, layouts, and captures multicell ranges.

Use the qualifiers from the Requirement Identification menu to select a subset of your spreadsheet to import requirements from.

  1. Choose individual rows and columns by mapping columns to requirement attributes. Select Specify rows and columns and click Configure columns. If there are no predefined headers in your spreadsheet, Simulink Requirements prompts you to specify the row that contains headers for attribute names.

  2. In the Configure columns dialog box, select the range of rows and columns to import. Select how each column in your spreadsheet can be mapped to Properties and Custom Attributes by choosing an option from that drop-down list. When you map columns to Properties and Custom Attributes, consider:

    • You can select only one column each for the Custom ID and Summary. If you cannot map one of the columns in the spreadsheet to a column that holds unique requirement Custom IDs, the Import operation automatically generates unique Custom IDs based on the rows in the spreadsheet. These Custom IDs might not be persistent. If you explicitly select a column that does not have unique Custom IDs, you cannot update the requirements document later.

    • You can select one or more continuous columns for the Description and the Rationale. The contents of these columns are concatenated into one field after the import is completed.

    • You must select at least one column for the Summary or the Description.

    To omit columns from the import, select the Ignore option.

  3. You can use regular expression search patterns to selectively identify and import items by occurrence. See Regular Expressions (MATLAB).

Import Requirements from ReqIF Files

To import requirements from a ReqIF file,

  1. Open the Document Import dialog box and select ReqIF file (*.reqif or *.reqifz) as the document type in the Document type field.

  2. In the Document location field, select the ReqIF file location.

  3. Simulink Requirements scans the ReqIF file and detects the source tool of the file. You can, however, select a Source tool from the drop-down list. Simulink Requirements readily supports ReqIF files created using Polarion, PREEvision, IBM Rational DOORS, or IBM Rational DOORS Next Generation. If you are importing requirements from an external application that is not listed here, select Generic.

  4. Select the location for the destination requirement set. If you are working with requirements that are maintained outside of Simulink Requirements and want to be able to update the imported requirement set with data from updated versions of the ReqIF file, select Allow updates from external source. If you plan to migrate your data into Simulink Requirements, do not check this option in order to freely edit the imported requirements. Complete the import process by clicking Import.

In ReqIF, a requirement is represented as a SpecObject, which has user-defined attributes. Simulink Requirements enables you to map the attributes of a SpecObject to either built-in or custom attributes of a requirement and to save this mapping as an XML file for future use. The mapping allows you to customize how requirements data imported from an external requirements management application is displayed in the Requirements Spreadsheet and in the Properties pane of the Requirements Editor or Requirements Perspective View.

To modify the attribute mapping after you import, select the top-level Import node of the requirement set (denoted by ) and expand the Attribute Mapping pane. You can also load a previously saved attribute mapping by clicking Load mapping.

Import Modes

Simulink Requirements provides two import modes for importing requirements content. Before you complete the Import process, you must specify if you want to allow updates to your imported requirements from the external requirements document by selecting or clearing Allow updates from external source.

Import Requirements

If you want to permanently migrate your requirements from the external requirements management application, do not allow updates to imported requirements from the external source document. Requirements are then imported as slreq.Requirement objects and are represented by in the Requirements Spreadsheet. Importing requirements as slreq.Requirement objects allows you to freely edit, delete, and rearrange requirements.

Import Referenced Requirements

If you choose to allow updates, requirements are imported as referenced requirements (slreq.Reference objects) that you can unlock and edit within Simulink Requirements.

Referenced requirements retain some dependencies to the source document and are locked for editing by default. Locked requirements are represented by in the Requirements Spreadsheet. Edit an individual requirement by navigating to it and clicking Unlock in the Properties pane. Unlocked requirements are represented by in the Requirements Spreadsheet. Unlock all referenced requirements by navigating to the top import node (denoted by ) and clicking Unlock all in the Requirement Interchange pane. You cannot re-lock requirements after you unlock them, except by updating them. You cannot delete or change the hierarchy of referenced requirements from within Simulink Requirements.

If your requirements are imported from an external source, other users are likely to change them in the external source document. To make your referenced requirements reflect the latest version of the requirements as in the external source document, obtain an updated file from the external source. Updating requirements from the external document overwrites all the local changes that you made to imported requirements content.

The Update operation preserves local custom attributes you create within Simulink Requirements. If you have attributes with the same name in the requirement set and in the external source document, the Update operation overwrites the local values with the attribute values defined in the external source document.

When working with referenced requirements, you can navigate to the requirement in the external source document by clicking Show in document in the Properties pane. If there is a change in the source document's file name or location, right-click the top node of the requirement set and select Update source document name or location.

See Also

Related Topics