How to add Simulink Library Block programmatically ?
Show older comments
Hi,
I try to generate a Simulink model with using add_block() function programmatically. I have an issue with a block path. When I use following example everything is ok.
sys = 'testModel';
new_system(sys) % Create the model
open_system(sys) % Open the model
pos = [30 37 60 50 ];
add_block('simulink/Sinks/Scope',[sys '/In1'],'Position',pos);
But if I try to insert another blocks I get an error : There is no block named 'NI VeriStand Blocks/NIVeriStand In1'
sys = 'testModel';
new_system(sys) % Create the model
open_system(sys) % Open the model
pos = [30 37 60 50 ];
add_block('NI VeriStand Blocks/NIVeriStand In1',[sys '/In1'],'Position',pos);

I thought that the path is same like in Simulink Library Browser, but it’s wrong probably
Is there any way how to found the path to the Simulink blocks?
Thanks Jan
Accepted Answer
More Answers (0)
Categories
Find more on Interactive Model Editing 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!