Is it possible to move the standard library simulink.mdl from it's installed location?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have edited the standard Simulink block library (simulink.mdl located under ...\MATLAB\R2011b\toolbox\simulink\blocks\library)so that it improves conformance with the MAAB rules (such as hiding names on certain blocks). I want to share this with others on my team to use, so I thought I could place it under version control and then just add the path so that it picks up my version of the library before the standard one. This however gives me the following warning...
Warning: Function C:\Program
Files\_file_store\matlabRoot\libs\standard\2011b\simulink.mdl
has the same name as a MATLAB builtin. We
suggest you rename the function to avoid a
potential name conflict.
> In path at 110
In addpath at 87
...and when I click to open Simulink, it simply opens the new version of the simulink.mdl library and not the library browser. If I manually call the libbrowse2 function (in libbrowse2.m), it opens the browser. The work around I have at the moment is a script to copy it from version control to the installation directory, overwriting the original. This works fine. Is there something I am missing or is this just not possible?
Thanks, Chris
0 Kommentare
Antworten (1)
Ryan G
am 5 Okt. 2012
Bearbeitet: Ryan G
am 5 Okt. 2012
If you wanted to modify the base simulink.mdl file, I would suggest renaming it and sending it out as a different library. The big challenge from your current workflow is upgrading. Although you may be version-locked now, when you try to upgrade later there will probably be a bunch of issues that arise and you may forget exactly what you changed.
Try this:
1) Save the new simulink.mdl as SimulinkMAAB.mdl (or something like that, also save as .slx if you are in a newer version).
3) Disperse the library to your colleagues.
Although you can't force them to use this as you would changing Simulink.mdl, some gentle nudging should get everyone on the same page to use this library over the standard simulink library.
2 Kommentare
Ryan G
am 8 Okt. 2012
I think even though you are version locked, you will never know where a model/library may end up in the future and the confusion from that library reference.
One thing you could do to adhere to the standards is write an m-file script to alter ALL of the blocks in the model to adhere to the standard. Hiding names on certain blocks is an easy one.
ConstantBlks = find_system(gcs,'BlockType','Constant');
cellfun(@(x) set_param(x,'ShowName','off'),ConstantBlks);
A mere 2 lines of code to hide the names of all constant blocks. You could do this to match up with the full MAAB standards and the script could easily follow any model or be used on any model.
Siehe auch
Kategorien
Mehr zu Naming Conventions finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!