How do I specify the name of a protected simulink model (.slxp file)?
Show older comments
I am using the Simulink.ModelReference.protect command to generate a protected model (.slxp) from a simulink model (.slx). For example, with file test_model.slx:
Simulink.ModelReference.protect("test_model");
This will create a protected model "test_model.slxp".
However, I want to name the .slxp file something different that the original .slx file for organizational purposes and to avoid shadowing conflicts. However, this is not possible according to the Simulink.ModelReference.protect documentation:
"The protected model has the same name as the source model and an .slxp file extension"
Trying to rename the .slxp either manually on the Files pane or using the "movefile" command will render the renamed .slxp file unusable. See command and image below:
movefile test_model.slxp renamed_slxp_file.slxp

Is there any way to specify the name of a .slxp file?
Accepted Answer
More Answers (0)
Categories
Find more on Model, Block, and Port Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!