Main Content

IsStereotypeDerivedFrom

Create query to select stereotype derived from qualified name

    Description

    query = IsStereotypeDerivedFrom(name) creates a query query that the find and createView functions use to select a stereotype from the qualified name name.

    example

    Examples

    collapse all

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

    import systemcomposer.query.*

    Open the Simulink® project file for the keyless entry system.

    openProject("scKeylessEntrySystem");

    Load the architecture model.

    model = systemcomposer.loadModel("KeylessEntryArchitecture");

    Create a query for all the hardware components and run the query, displaying one of them.

    constraint = HasStereotype(IsStereotypeDerivedFrom("AutoProfile.HardwareComponent"));
    hwComp = find(model,constraint,Recurse=true,IncludeReferenceModels=true);
    comp = hwComp(16)
    comp = 1×1 cell array
        {'KeylessEntryArchitecture/FOB Locater System/Center Receiver/Antenna'}
    
    

    Input Arguments

    collapse all

    Stereotype name, specified in the form "<profile>.<stereotype>".

    Example: "AutoProfile.BaseComponent"

    Data Types: char | string

    Output Arguments

    collapse all

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

    More About

    collapse all

    Version History

    Introduced in R2019b