Editing default simulink libraries

3 visualizaciones (últimos 30 días)
Jonathan Adams
Jonathan Adams el 1 de Feb. de 2016
Comentada: Jonathan Adams el 1 de Feb. de 2016
I'm running version 2013b and I'd like to modify the default Simulink libraries for styling and ease of use. An example of this is input and output port colors (green for input, red for output) or removing the data limiting in the default Simulink scopes. One way I can edit them is to manually change the simulink.slx and simviewers.mdl files within the MATLAB folder structure, but this requires administrative permissions on the files. Is there another way to edit these kinds of properties in the default libraries?

Respuestas (1)

Ilham Hardy
Ilham Hardy el 1 de Feb. de 2016
Editada: Ilham Hardy el 1 de Feb. de 2016
Is that even possible/allowed?
What I usually do is using script to give the model "make-over" by using find_system(),
list all the specified blocks and edit them using set_param() in the for-loop..
  1 comentario
Jonathan Adams
Jonathan Adams el 1 de Feb. de 2016
In theory this would work for some of the styling changes, and honestly making a custom default library would probably work for styling/mask parameter changes to default blocks. This solution doesn't work for attaching a viewer to a signal. (right click signal -> Create and Connect Viewer -> Simulink -> Scope)
This scope isn't the same as the scope block in the "Sinks" library and resides in a different library file. (simviewers.mdl) If you've ever wanted to see more than the default limited number of data points you have to manually deselect this in the scope properties every time you attach a scope.
In version 2010a all of these libraries were available for modification, but in 2013b the user's permissions were restricted to read and execute. An administrator must grant the user access to modify the files. I can understand why this would be restricted; I wondered if anyone knew a way within MATLAB to change library defaults.

Iniciar sesión para comentar.

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by