Main Content

AnyComponent

Create query to select all components in model

    Description

    example

    query = AnyComponent() creates a query object that the find method and the createViewArchitecture method use to select all components in the model.

    Examples

    collapse all

    Import the package that contains all of the System Composer™ queries.

    import systemcomposer.query.*;
    

    Open the Simulink® project file.

    scKeylessEntrySystem

    Open the model.

    m = systemcomposer.openModel('KeylessEntryArchitecture');

    Create a query to find all components and list the second.

    constraint = AnyComponent();
    components = find(m,constraint,'Recurse',true,'IncludeReferenceModels',true);
    components(2)
    ans =
    
      1×1 cell array
    
        {'KeylessEntryArchitecture/Door Lock//Unlock System/Door Lock Controller'}

    Output Arguments

    collapse all

    Query, returned as a systemcomposer.query.Constraint object.

    Introduced in R2019b