Is there a method to apply source control functionality to individual blocks in a library in Simulink 6.1 (R14SP1)?

1 view (last 30 days)
I am trying to develop a set of custom libraries in Simulink for eventual deployment. Throughout this development, I would like to be able to version control all of the individual blocks within the library separately. I have been able to version control the library itself, but have been unable to figure out how to version control all of the blocks within each library. Is this possible?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The ability to apply source control functionality to individual blocks within a library separately is not available in Simulink.
Ultimately, libraries are themselves one model file (for example: mylib.mdl). Therefore, since source control is on the file level there can only be source control performed on that one file, and there is no ability to distinguish what particular block changed and when, and so forth. Thus, if your blocks were implemented as S-functions, the source file for these S-functions could undergo source control as well as the model file which refers to this S-function source file, but this is not possible with subsystems drawing from Simulink block libraries.
Currently, to work around this issue, you may wish to implement all of your blocks in your library as individual models. Then, in order to create your library for deployment you would need to copy/paste the subsystem created in each block's individual model file to the library. This results in the ability to version control them directly. Thus any change made to the library would need to be done through the individual block's specific model file. If desired you could then create a script which updates this library in an automated fashion using Model Construction commands included with Simulink.

More Answers (0)

Categories

Find more on Block and Blockset Authoring in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!