bl = Simulink.findBlocks(sys,Param1=Value1,...,ParamN=ValueN,options)
finds blocks whose parameters have the specified values and that match the criteria
specified by a FindOptions object.
Suppose you have a model named myModel.
Get the handles and names of all blocks in the model.
Get the handles of all blocks in the model.
h = Simulink.findBlocks("myModel");
Get the block names.
n = getfullname(h);
Suppose you have a model named myModel.
The model contains a Subsystem block named
mySubsystem. Get the handles and names of all blocks in
the subsystem.
Get the handles of all blocks in the model.
h = Simulink.findBlocks("myModel/mySubsystem");
Suppose you have a loaded model named
myModel. The model contains masked subsystems. Get the
handles of all blocks in the model, excluding blocks in the masked
subsystems.
Create a FindOptions object that specifies you want to
exclude the content of masked subsystems in the search.
f = Simulink.FindOptions(SearchUnderMasks="none");
Get the block handles.
h = Simulink.findBlocks("myModel",f);
Suppose you have a model named
myModel.
Get the handles of all blocks in the model whose Gain
parameter has a value of 5.
Model or subsystem to search for blocks. Specify a model using a name, and
a subsystem using the block path of the corresponding
Subsystem block. Format the name or path as a string or
character vector.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.