Modify a Simulink model after protected it

4 ビュー (過去 30 日間)
Mathieu Gauquelin
Mathieu Gauquelin 2021 年 9 月 1 日
Hello,
There is something I don't understand about the function Simulink.ModelReference.ProtectedModel.setPasswordForModify.
I protect my model with the following script:
mdlref = 'myModel';
open_system(mdlref);
set_param(bdroot, 'ModelReferenceNumInstancesAllowed', 1);
save_system(mdlref);
Simulink.ModelReference.ProtectedModel.setPasswordForModify(mdlref, 'password');
Simulink.ModelReference.ProtectedModel.setPasswordForSimulation(mdlref, 'password');
[harnessHande, neededVars] = Simulink.ModelReference.protect(mdlref, 'Report', true, 'Modifiable', true, 'Mode', 'Accelerator');
In this way, for me the final user will be able to modify the protected model because the argument Modifiable is set to true during the model protection.
But, after adding my protected model on a top model, I can access on the inside of the model, I am never asking for the password.
Two answers for me today:
  1. The modification concerns only some properties of the model because a protected model can be modified in any way,
  2. I miss a step in the model protection.
Can you help me please? Thank you in advance.
Best regards.

回答 (0 件)

カテゴリ

Help Center および File ExchangeEvent Functions についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by