Main Content

getShown

R2026b

Get whether connector is shown

Since R2026b

    Description

    flag = getShown(connector) returns true if the connector connector is shown in the architecture model.

    For more information on how to show and hide connectors on the System Composer™ canvas, see Show and Hide Connector Lines.

    example

    Examples

    collapse all

    Determine whether a connector is shown in the current architectural diagram.

    Create a model with components, ports, and a connector between them.

    model = systemcomposer.createModel("newModel");
    systemcomposer.openModel("newModel")
    comp1 = model.Architecture.addComponent("Component1");
    comp2  = model.Architecture.addComponent("Component2");
    out1 = comp1.Architecture.addPort("Out1","out");
    in1 = comp2.Architecture.addPort("In1","in");
    outport1 = comp1.getPort("Out1");
    inport1 = comp2.getPort("In1");
    conn1 = outport1.connect(inport1);

    Get whether the connector is shown.

    shown = conn1.getShown
    shown =
    
      logical
    
       1

    Input Arguments

    collapse all

    Connection between ports, specified as a systemcomposer.arch.Connector object.

    Output Arguments

    collapse all

    Whether connector is shown, returned as 1 (true) if the connector is shown and 0 (false) if the connector is hidden.

    Data Types: logical

    More About

    collapse all

    Version History

    Introduced in R2026b