Open Simulink Editor "Requirements Manager" App programmatically

14 views (last 30 days)
Is it possible to open programmatically an app, for example the Requirements Manager, in a Simulink model using a command line command?
I am trying to enter into the Requirements perspective view automatically, and opening the Requirements Manager is one way to do it.
Thank you
Francesco Mecocci
Francesco Mecocci on 6 Oct 2021
Hi Alex! Thank you very much for your answer! I managed to do exactly what I needed, that was opening the requirements manager in order to then generate a web view which contained the requirements! Before, I did not not manage just by activating the option 'requirements' in slwebview().
This is the code I used, where I added the middle command you suggested. Thank you!
set_param(libraryModel, 'Lock', 'off');
slwebview(libraryModel, ...
'OptionalViews', {'requirements'},...
'SearchScope', 'All', ...
'LookUnderMasks', 'all', ...
'FollowLinks', 'on', ...
'FollowModelReference', 'on',...
'ViewFile',false )

Sign in to comment.

Answers (1)

Chetan Bhavsar
Chetan Bhavsar on 6 Oct 2021
blk_with_req = ['slvnvdemo_fuelsys_officereq/fuel rate controller/'...
'Airflow calculation']
reqts = rmi('get', blk_with_req);
reqts.description = 'Mass airflow estimation';
rmi('set', blk_with_req, reqts);
new_req = rmi('createempty');
new_req.doc = 'fuelsys_requirements2.htm';
new_req.description = 'New requirement';
rmi('cat', blk_with_req, new_req);
rmi('report', 'slvnvdemo_fuelsys_officereq');
  1 Comment
Francesco Mecocci
Francesco Mecocci on 6 Oct 2021
Thanks for your answer, however I cannot achieve exactly what I need with the above commands. I have added further details to the question now. I'm after a command that opens the requirements perspective and/or the requirements manager APP.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!