How can I programatically add requirements to blocks in a Simulink in Simulink Verification and Validation 2.4 (R2008b)?

1 回表示 (過去 30 日間)
The documentation for Simulink Verification and Validation 2.4 (R2008b) describes how to add requirements to an object using the graphical user interface. I want to add requirements to the Simulink blocks programmatically.

採用された回答

MathWorks Support Team
MathWorks Support Team 2010 年 1 月 22 日
The RMI command is the Requirements Management Interface API. The documentation for this command can be reached using the following command:
web([docroot,'/toolbox/slvnv/ug/rmi.html'])
The following MATLAB code is an example of how to use it:
reqlinks = rmi('createempty'); % Create an empty requirement structure
reqlinks.doc = 'MyDoc.docx'; % The document to be linked is MyDoc.docx
reqlinks.id = '?Req1'; % In the document, the requirement is "Req1"
reqlinks.description = 'This is the description of my requirement'; % Description
reqlinks.reqsys = 'word'; % type of requirement, a word document
load_system('vdp'); % Load the Simulink
obj = 'vdp/Mu'; % The Simulink object we want to link to a requirement, the block named "Mu" in model "vdp.mdl"
rmi('set', obj, reqlinks); % Accociate the requirement to the bloc
This code will link the requirement "Req1" located in the word file "MyWord.docx" to the block "Mu" located in vdp.mdl.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVerification, Validation, and Test についてさらに検索

タグ

タグが未入力です。

製品


リリース

リリースが未入力です。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by