Updating library information in script
7 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (3 件)
Kaustubha Govind
2012 年 9 月 17 日
"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 件のコメント
Guy Rouleau
2012 年 9 月 18 日
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 件のコメント
Abullah abutaleb
2020 年 4 月 25 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Configure and View Diagnostics についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!