Property

Create query to select non-evaluated values for properties or stereotype properties for objects based on specified property name

    Description

    example

    query = Property(name) creates a query object that the find method and the createViewArchitecture method use to select non-evaluated values for properties or stereotype properties for objects based on specified property name.

    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 components that contain the character vector 'Sensor' in their 'Name' property and run the query, displaying the first.

    constraint = contains(Property('Name'),'Sensor');
    sensors = find(m,constraint,'Recurse',true,'IncludeReferenceModels',true);
    sensors(1)
    
    ans = 
    
    1×1 cell array
    
        {'KeylessEntryArchitecture/Door Lock//Unlock System/Front Driver Door Lock Sensor'}

    Input Arguments

    collapse all

    Property name for model element, specified as a character vector as fully qualified name '<profile name>.<stereotype name>.<property name>' or any property on the designated class.

    Example: 'Name'

    Example: 'AutoProfile.BaseComponent.Latency'

    Data Types: char

    Output Arguments

    collapse all

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

    Introduced in R2019b