Main Content

systemcomposer.getSelectedInterfaces

Get selected interfaces in Interface Editor

Since R2024a

    Description

    interfaces = systemcomposer.getSelectedInterfaces(modelName) gets selected interfaces from the Interface Editor in a model specified by modelName as an array of interface objects.

    example

    Examples

    collapse all

    Create a model with a component called Component.

    model = systemcomposer.createModel("archModel");
    systemcomposer.openModel("archModel");
    arch = get(model,"Architecture");
    comp = addComponent(arch,"Component");

    Add a port to the component.

    newPort = addPort(comp.Architecture,"newPort","in");

    Add a data interface to the model dictionary.

    newInterface = addInterface(model.InterfaceDictionary,"newInterface");

    Select newInterface on the Interface Editor. Get the selected interfaces. Then, set the interface on the port.

    interfaces = systemcomposer.getSelectedInterfaces("archModel");
    setInterface(newPort,interfaces)

    Input Arguments

    collapse all

    Name of model, specified as a character vector or string.

    Example: "exMobileRobot"

    Data Types: char | string

    Output Arguments

    collapse all

    More About

    collapse all

    Version History

    Introduced in R2024a

    See Also

    Functions

    Objects

    Blocks

    Tools