Main Content

Save requirements traceability data in external file


example saves requirements traceability data for a model in an external SLMX file. The model must be configured to store requirements traceability data externally. This function is equivalent to Save > Save Links Only in the Requirements tab.


collapse all

This example shows how to add a requirement link to an existing example model, and save the model requirements traceability data in an external file.

Open the slvnvdemo_powerwindowController model.


Specify that the model store requirements data externally.


Create a new requirements link structure.

newReqLink = rmi('createEmpty');
newReqLink.description = 'newReqLink';

Specify the requirements document that you want to link to from the model. In this case, an example requirements document is provided.

newReqLink.doc = 'PowerWindowSpecification.docx';

Specify the text of the requirement within the document to which you want to link. = '?passenger input consists of a vector with three elements';

Specify that the new requirements link that you created be attached to the Mux4 block of the slvnvdemo_powerwindowController example model.


Save the new requirement link that you just created in an external .slmx file associated with the model.'slvnvdemo_powerwindowController');

This function is equivalent to Save > Save Links Only in the Requirements tab.

To highlight the Mux4 block, turn on requirements highlighting for the slvnvdemo_powerwindowController example model.


You can test your requirements link by right-clicking the Mux4 block. In the context menu, select Requirements > 1. “newReqLink”.

Close the model.


Input Arguments

collapse all

Name of model with requirements links, specified as a character vector, or handle to model with requirements links. The model must be loaded into memory and configured to store requirements traceability data externally.

If you have a new model with no existing requirements links, configure it for external storage as described in Requirements Link Storage. You can also use rmipref to specify storage settings.

If you have an existing model with internally stored requirements traceability data, convert that data to external storage as described in Move Internally Stored Requirements Links to External Storage. You can also use rmidata.export to convert existing requirements traceability data to external storage.

Example: 'slvnvdemo_powerwindowController'

Example: get_param(gcs,'Handle')

Version History

Introduced in R2013b