How do I save a Simulink Test harness by command line/script?

조회 수: 5 (최근 30일)
Simon Ahrens
Simon Ahrens 2020년 6월 18일
답변: Simon Ahrens 2020년 6월 18일
I'm trying to use a script to open and modify a few dozen test harnesses for my model. Excerpt:
sltest.harness.open(modelName, harnesses(n).name);
sltest.testsequence.addSymbol(blockName, signalName, ...
'Data', 'Output');
However, I can't find a command for saving the changes. If I use
sltest.harness.close(modelName, harnesses(n).name);
I get the following error:
Error using editHarnesses (line 32)
Unable to close the test harness 'xxx' since it has unsaved changes. Please save the harness and
try the close operation again.
The model stores its harnesses in external .slx files.

채택된 답변

Simon Ahrens
Simon Ahrens 2020년 6월 18일
Nevermind, I'm silly and expected a dedicated Simulink Test save function. In fact the Simulink function
save_system
works just fine.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Inputs에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by