Main Content

Stateflow.Message

Create message

Syntax

message_new = Stateflow.Message(parent)

Description

The Stateflow.Message method is a constructor method for creating a message in a parent chart, state, or box. This method returns a handle to the new Message object.

Arguments

parent

Handle to parent chart, state, or box of new message

Returns

message_new

Handle to the Message object for the new message

Examples

If sA is a handle to a State object for an existing chart A, the following command creates a new message parented (contained by) chart A:

message_new = Stateflow.Message(sA)

The new message is named 'message' with an incremented suffix to distinguish additional creations . message_new is a handle to a Message object for the new message that you use to rename the message, set its properties, and execute Message methods for the message.

Introduced in R2015b