How to configure path setting for generating requirements traceability report?

1 回表示 (過去 30 日間)
Xiaojie Qiu
Xiaojie Qiu 2018 年 11 月 13 日
回答済み: Leo 2021 年 3 月 13 日
Hi everyone,
I'm trying to generate a requirements traceability report using the toolbox Simulink Requirements based on MATLAB R2018a. After generation, the report is always placed under the current folder. However, I want to store the generated report under a pre-defined folder instead.
Is there a way to solve this problem?
Best regards,
qxj

回答 (1 件)

Leo
Leo 2021 年 3 月 13 日
Hi Xiaojie,
Unfortunately, R2018a does not support remembering the predefined path. Remembering the report path during MATLAB sesssion was introduced since R2019a.
As a workaround, you can try to use the custom facing APIs to see whether it will satisfy your needs:
slreq.generateReport
For example:
% get the requirement set:
% you also can use loadeReqSet = slreq.find('Type', 'ReqSet', 'Name',
% 'ReqSetName') to get it if it is loaded already.
loadedReqSet = slreq.load(filepathOrNameOfSavedReqSet);
% get the default options for report.
reqOptions = slreq.getReportOptions;
reqOptions.reportPath = fullfile(yourPredefinedPath, [reqSetName, '.docx']);
% generate report.
slreq.generateReport(loadedReqSet, reqOptions);
You can create a shortcut to call this script to generate report without reinvoking the report option dialog every time.
Hope this helps.
Thanks,
ZQ

カテゴリ

Help Center および File ExchangeSimulink Report Generator についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by