Display Properties and Methods of Stateflow Objects

Display Properties

To access the names of all properties for any particular object, use the get method. For example, if the object s is a State object, enter this command to list the properties and current values for any State object:


To get a quick description for each property, use the help method. For example, if s is a State object, this command returns a list of State object properties, each with a small accompanying description:



Some properties do not have a description, because their names are considered descriptive enough.

Display Names of Methods

Use the methods method to list the methods for any object. For example, if the object t is a handle to a Transition object, use this command to list the methods for any Transition object:



These internal methods may be displayed by the methods method for an object, but you cannot use them and they are not documented: areChildrenOrdered, getChildren, getDialogInterface, getDialogSchema, getDisplayClass, getDisplayIcon, getDisplayLabel, getFullName, getHierarchicalChildren, getPreferredProperties, isHierarchical, isLibrary, isLinked, isMasked.

Use a combination of the get method and the classhandle method to list only the names of the methods for an object. For example, list the names of the methods for the Transition object t with this command:

get(t.classhandle.Methods, 'Name');

Display Property Subproperties

Some properties are objects that have properties referred to as subproperties. For example, when you invoke the command get(ch) on a chart object, ch, the output displays the following for the StateFont property:

StateFont: [1x1 Stateflow.StateFont]

This value indicates that the StateFont property of a state has subproperties. To view the subproperties of StateFont, enter the command get(ch.StateFont) to see something like this:

Name: 'Helvetica'
Size: 12
Weight: 'NORMAL'
Angle: 'NORMAL'

This list shows that Name, Size, Weight, and Angle are subproperties of the property StateFont. In the API reference pages for this guide, these properties are listed by their full names: StateFont.Name, StateFont.Size, and so on.

Display Enumerated Values for Properties

Many API object properties can be set only to one of a group of values. You can identify these properties from the API reference pages. When you use the get method to access object properties (see Display Properties) the values for these properties appear.

You can use the set method to display a list of acceptable values for a property. For example, if ch is a handle to a Chart object, you can display the allowed enumerated values for the Decomposition property of that chart with this command:


Related Topics