Main Content

addInteraction

Create new sequence diagram in model

Since R2024b

    Description

    interaction = addInteraction(model,name) creates a sequence diagram in a System Composer™ model.

    example

    interaction = addInteraction(model,name,CopyFrom=copyFrom) creates a copy of the interaction sequence diagram in model model with name name.

    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");

    Create a sequence diagram in the model, and then open the sequence diagram.

    interaction = model.addInteraction("NewSequenceDiagram");
    interaction.open

    Input Arguments

    collapse all

    Architecture model, specified as a systemcomposer.arch.Model object.

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

    Example: "inhibit"

    Data Types: char | string

    Interaction to copy from, specified as a systemcomposer.interaction.Interaction object.

    Example: interaction = addInteraction(model,"NewSequenceDiagram",CopyFrom=originalInteraction)

    Output Arguments

    collapse all

    Interaction, returned as a systemcomposer.interaction.Interaction object.

    More About

    collapse all

    Version History

    Introduced in R2024b