Using Simulink     Search    Help Desk 
find_system    Examples   See Also

Find systems, blocks, lines, and annotations.

Syntax

Description

find_system(sys, constraint, cv, `p1', v1, `p2', v2,...) searches the system(s) or subsystems specified by sys, using the constraint specified by constraint, and returns handles or paths to the objects having the specified parameter values v1, v2, etc. sys can be a pathname (or cell array of pathnames), a handle (or vector of handles), or omitted. If sys is a pathname or cell array of pathnames , find_system returns a cell array of pathnames of the objects it finds. If sys is a handle or a vector of handles, find_system returns a vector of handles to the objects that it finds. If sys is omitted, find_system searches all open systems.

Case is ignored for parameter names. Value strings are case sensitive. Any parameters that correspond to dialog box entries have string values. See Appendix A for a list of model and block parameters.

You can specify any of the following search constraints.

Table 10-1: Search Constraints
Name
Value Type
Description
'SearchDepth'
scalar
Restricts the search depth to the specified level (0 for open systems only, 1 for blocks and subsystems of the top-level system , 2 for the top-level system and its children, etc.) Default is all levels.
'LookUnderMasks'
'on'| 'off'
If 'on', search extends into masked systems. Default is 'off'.
'FollowLinks'
'on'| 'off'
If 'on', search follows links into library blocks. Default is 'off'.
'FindAll'
'on'| 'off'
If 'on', search extends to lines and annotations within systems. Default is 'off'.

If 'constraint' is omitted, find_system uses the default constraint values.

Examples

This command returns a cell array containing the names of all open systems and blocks.

This command returns the names of all open block diagrams.

This command returns the names of all Goto blocks that are children of the Unlocked subsystem in the clutch system.

find_system('clutch/Unlocked','SearchDepth',1,'BlockType','Goto')

These commands return the names of all Gain blocks in the vdp system having a Gain parameter value of 1.

The above commands are equivalent to this command.

These commands obtain the handles of all lines and annotations in the vdp system.

See Also



[ Previous | Help Desk | Next ]