フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How can I migrate a model reference hierarchy to use a common data dictionary programatically?

1 回表示 (過去 30 日間)
Rodrigo Estrella
Rodrigo Estrella 2018 年 6 月 28 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
How can I migrate a model reference hierarchy to use a common data dictionary programatically?
To migrate a single model I can use:set_param(modelName,'DataDictionary',dictionaryName);
To migrate a model reference hierarchy I can go to the Model Properties dialog box -> Data, and select Data Dictionary. A message will be shown asking if I want to migrate referenced variables from base workspace to the same dictionary. I’m looking for a way to do this programatically.
Thank you

回答 (1 件)

Mark McBroom
Mark McBroom 2018 年 6 月 28 日
編集済み: Mark McBroom 2018 年 6 月 28 日
use
mdlList = find_mdlrefs(modelName);
for i=1:numel(mdlList)
set_param(mdlList{i},'DataDictionary',dictionaryName);
end

この質問は閉じられています。

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by