Updating library information in script
5 views (last 30 days)
Show older comments
I am creating a toolbox that allows others to embed user data onto some calibrations for later reporting. The block digrams they are manipulating are libraries so the changes they make will propagate to all models with links to the library. I first unlock the library using:
set_param(Library,'Lock','off')
but when I use the following command to update the library with the changes:
set_param(Library, 'SimulationCommand', 'update')
I get the following error:
??? Simulation of model Library is not allowed because it is a block diagram library.
How do I apply the changes to the library in code?
0 Comments
Answers (3)
Kaustubha Govind
on 17 Sep 2012
"set_param(Library, 'SimulationCommand', 'update')" is used to compile block diagrams for simulation (for example, signals datatypes/sizes are figured out in this phase, amongst other important things), and does not apply to models. Do you mean that you want to force changes in the library to propagates to models using the library? I believe that should happen automatically when a model using the library blocks is opened.
0 Comments
Guy Rouleau
on 18 Sep 2012
Based on your description,. it looks like you want to PROPAGATE... not update.
When looking here:
I think you need to use this param:
LinkStatus
Link status of block. Updates out-of-date linked blocks when queried using get_param.
See Check and Set Link Status Programmatically .
'none' | 'resolved' | 'unresolved' | 'implicit' | 'inactive' | 'restore' | 'propagate' | 'propagateHierarchy' | 'restoreHierarchy'
0 Comments
Abullah abutaleb
on 25 Apr 2020
Warning: Input port 1 of 'untitled/1//La1' is not connected.
Warning: Output port 1 of 'untitled/1//La1' is not connected.
Warning: Using a default value of 0.2 for maximum step size. The simulation step size will be equal to or less than this value. You can disable this diagnostic by
setting 'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics page of the configuration parameters dialog.
Warning: Input port 1 of 'untitled/1//La1' is not connected.
Warning: Output port 1 of 'untitled/1//La1' is not connected.
Warning: Using a default value of 0.2 for maximum step size. The simulation step size will be equal to or less than this value. You can disable this diagnostic by
setting 'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics page of the configuration parameters dialog.
0 Comments
See Also
Categories
Find more on Configure and View Diagnostics 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!