Main Content

disableMappingForSymbol

Disable input event in atomic subchart or box

Description

example

disableMappingForSymbol(subchart,subchartEvent) disables the input event subchartEvent in the atomic subchart or box subchart. For more information, see Map Input Events for an Atomic Subchart.

example

disableMappingForSymbol(subchart,subchartEventName) disables the input event named subchartEventName.

Examples

collapse all

In an atomic subchart called A, disable the input event E.

Access the Stateflow.AtomicSubchart object for the atomic subchart A.

subchart = find(sfroot,"-isa","Stateflow.AtomicSubchart",Name="A");

Use the Subchart property to access the Stateflow.Event object for the input event E.

subchartEvent = find(subchart.Subchart, ...
    "-isa","Stateflow.Event",Name="E");

Get the mapping for input event E.

getMappingForSymbol(subchart,subchartEvent).Name
ans =

    'E'

Disable input event E.

disableMappingForSymbol(subchart,subchartEvent)
getMappingForSymbol(subchart,subchartEvent)
ans =
    []

In an atomic subchart called A, disable the input event E.

Access the Stateflow.AtomicSubchart object for the atomic subchart A.

subchart = find(sfroot,"-isa","Stateflow.AtomicSubchart",Name="A");

Get the mapping for input event E.

getMappingForSymbol(subchart,"E").Name
ans =

    'E'

Disable input event E.

disableMappingForSymbol(subchart,"E")
getMappingForSymbol(subchart,"E")
ans =

    []

Input Arguments

collapse all

Atomic subchart or box, specified as a Stateflow.AtomicSubchart or Stateflow.AtomicBox object.

Input event in atomic subchart or box, specified as a Stateflow.Event object.

Name of input event in atomic subchart or box, specified as a string scalar or character vector.

Version History

Introduced in R2022b