Prevent referenced subsystem from being modified

조회 수: 34 (최근 30일)
Benjamin
Benjamin 2023년 5월 31일
댓글: Benjamin 2024년 5월 3일
Hello,
I built a custom Simulink library containing modules, each using at least one referenced subsystem.
When I later use one of these library modules in my models, I am able to enter the referenced subsystems and edit it.
How can I lock them without locking the library?

답변 (1개)

Atharva
Atharva 2023년 6월 21일
Hey Benjamin,
To prevent referenced subsystems from being modified while still allowing the library to remain editable, you can use the Simulink Protection feature. Simulink Protection allows you to protect individual subsystems or blocks within a model, preventing them from being edited or modified.
Here's how you can lock the referenced subsystems without locking the entire library:
  1. Open the Simulink library that contains your custom modules.
  2. Select the referenced subsystem that you want to lock within your library.
  3. Right-click on the subsystem and select "Protect Subsystem" from the context menu. This will open the "Protect Subsystem" dialog.
  4. In the "Protect Subsystem" dialog, choose the desired protection level for the referenced subsystem. You can choose "Lock" to completely prevent any modification, or you can choose other options depending on your requirements.
  5. Click on the "OK" button to apply the protection settings to the referenced subsystem.
By following these steps, you can protect the referenced subsystem within your library while keeping the rest of the library editable. Note that you might need appropriate access permissions to enable the protection feature.
  댓글 수: 2
Ludo Houben
Ludo Houben 2023년 10월 13일
Hi Atharva
I have the same issue (version 2022b), but I currently use 'models' to build my library, as I want to be able to unittest them. It there a similar option for this? As I cannot see any 'Protect...' option in the context menu.
Thanks for any answer
Ludo
Benjamin
Benjamin 2024년 5월 3일
Hello Atharva, are you sure this is possible with a Referenced Subsystem?
I'm currently using R2023b and I never found the "Protect Subystem" context menu. Documentation details the How To regarding models https://fr.mathworks.com/help/rtw/ug/create-a-protected-model-using-the-model-block-context-menu.html but It does not adress Referenced Subsystem.
Additional information: I do have options in the context menu or the MODEL BLOCK/ACTIONS ribbon if I use a Referenced Model instead of Subsystem.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Subsystems에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by