Customized Library version management

4 views (last 30 days)
Hello,
I would like to create a library in Simulink with the possibility of version management of the individual blocks in the library.
I have already implemented a library. However, if I make a change to one block, it immediately affects all my models. But I don't want this to happen automatically. I would like to be able to decide whether the block in my model should apply the change or not. In the library itself, however, I only want the latest version to be displayed.
So my question is whether anyone already has experience with the Simulink library and versioning and can give me a tip.

Accepted Answer

Benjamin Thompson
Benjamin Thompson on 14 Jul 2022
Edited: Benjamin Thompson on 14 Jul 2022
Simulink libraries just have one version number for the whole thing just like Simulink model files. You can not version each block in a library separately. If you have a model using a library block, you can disable that library link and modify the block in the model using it. Then Simulink will have a push or restore option that you can choose when it comes times to decide whether to have your model continue using the modified library block, push that modified block to the library to make the change permanent, or revert the change to use the library block.
  3 Comments
Jannik Heuermann
Jannik Heuermann on 16 Jul 2022
Yes, I know that I can lock a library.
I want to prevent users from making changes.
But that is not my main problem. My main problem is that the library blocks in all models will be updated when you change the library block.
For example:
I have a library with block X. I want this library to be "link-locked" so that the user cannot change the block manually. Maybe in some time I would like to implement a new and changed version of the block X. Version 2.0, if you like. In the library I would like to replace the old version of Block X with the new one. In my old models, in which the old version of Block X is installed, I don't want these blocks to be updated automatically. I would like to keep the old version in the old models.To "disable link" would be a solution, but I don't want that, because it would allow the user to change my library block as well.
My hope was that MATLAB has a solution for this. But now I think I need to have several versions (1.0, 2.0 ...) of the particular blocks in the library and program a custom function that has the ability to update old models by replacing the old blocks with the latest version available.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by