How to discard unsaved changes to a Data Dictionary?

14 ビュー (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2019 年 4 月 19 日
編集済み: MathWorks Support Team 2022 年 7 月 8 日
How to discard unsaved changes to a Data Dictionary?

採用された回答

MathWorks Support Team
MathWorks Support Team 2022 年 6 月 20 日
編集済み: MathWorks Support Team 2022 年 7 月 8 日
In the tempdir there is an SLDDC file that stores the changes that have not been saved to the SLDD file. If MATLAB crashes, we are able to use this file and restore the pending changes.
To instead discard the changes you should open the Data Dictionary and discard the changes with "discardChanges":
>> h = Simulink.data.dictionary.open('myDictionary.sldd')
>> h.discardChanges
Notice that the property HasUnsavedChanges goes from true to false. Please refer to this link for more information:

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeManage Design Data についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by