rmidata.save
Save requirements traceability data in external file
Syntax
Description
Examples
Create New Requirement Link and Save Externally
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.
open_system('slvnvdemo_powerwindowController');
Specify that the model store requirements data externally.
rmipref('StoreDataExternally',1);
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.
newReqLink.id = '?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.
rmi('set','slvnvdemo_powerwindowController/Mux4',newReqLink);
Save the new requirement link that you just created in an external .slmx
file associated with the model.
rmidata.save('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.
rmi('highlightModel','slvnvdemo_powerwindowController');
You can test your requirements link by right-clicking the Mux4 block. In the context menu, select Requirements > 1. “newReqLink”.
Close the model.
close_system('slvnvdemo_powerwindowController');
Input Arguments
model
— Name or handle of model with requirements links
character vector | handle
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 Specify Requirements Link Storage for Models. 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
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)