Main Content


Add or provide password for modifying protected model



Simulink.ModelReference.ProtectedModel.setPasswordForModify(model,password) adds a password for a modifiable protected model. After the password has been created, the function provides the password for modifying the protected model.


collapse all

Create a modifiable protected model with support for code generation, then modify it to add Web view support.

Add the password for when a protected model is modified. If you skip this step, you are prompted to set a password when a modifiable protected model is created.


Create a modifiable protected model with support for code generation and Web view.

'CodeGeneration', 'Modifiable',true, 'Report',true);

Provide the password to modify the protected model.

'sldemo_mdlref_counter', 'password');

Add support for Web view to the protected model that you created.


Input Arguments

collapse all

Model name, specified as a string or character vector. It contains the name of a model or the path name of a Model block that references the protected model to be modified.

Password, specified as a string or character vector. The password is required for modification of the protected model.

Version History

Introduced in R2014b