Can I create a slmx file separated from the model-slmx file to save only links between requirements and Test Assessments steps?
10 次查看(过去 30 天)
显示 更早的评论
Hello,
I am working on a Harness that test a Simulink model. The harness was saved externally and also the requirement links are stored externally.
However, when creating the "Related To" links between the requirements and steps inside the Test Assessment block, links are saved in the same slmx file than the links to model itself ("Model.slmx"). Is it possible to change this configuration to create a separated slmx file that contains only the links between Harness and requirements (something like Harness.slmx)?
Many thanks in advance for the support.
0 个评论
采纳的回答
Artem
2024-6-25
Unfortunately, this will not be possible. Because Component Harnesses may be optionally stored in main model .slx, the links are stored in same .slmx file. When harness is saved into a separate file, links remain in the main .slmx.
It would help to understand, why you need the harness links stored seprately. If the goal is to have separate .slmx files for each harness used with the same main model, you can try to accomplish this using slreq.map() function:
slreq.map(pathToModel, pathToSlmx)
This allows to maintain multiple .slmx files for the same model, and load them selectively, depending on active harness. Overall workflow would look something like this:
1) slreq.map(pathToModel, harness1.slmx)
2) Open main model, open Harness 1, create some links, save the LinkSet. harness1.slmx will be created.
3) close everything, including the ReqSet
4) slreq.map(pathToModel, harness2.slmx)
5) Open main model, open Harness 2, create other links, save the LinkSet. harness2.slmx will be created
6) Open Requirements Editor, hanress2.slmx will contain links for Harness 2.
7) slreq.map(pathToModel, harness1.slmx) - harness1.slmx will get loaded, it will contain the links for Harness 1.
Note that this is an untested workflow. It is not clear how the 2nd set of links will behave at this point, if harness2.slmx is still loaded, along with harness1.slmx. Unfortunately, you cannot force-unload one of the LinkSets, while the linked ReqSet is loaded. This complication can be avoided by using multiple ReqSet files. For the example above, requirements for Harness 1 would be in ReqSet1.slreqx, and requirements for Harness 2 would be in ReqSet2.slmx. This way you could "Close" ReqSet2 before remapping main model to harness1.slmx, and only ReqSet1 would load to resolve the links loaded from harness1.slmx
Hope this helps.
Artem.
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Outputs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!