This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Programmatic Interface

API for creating, deleting, finding, and modifying chart elements


sfgco Recently selected objects in chart
sfclipboard Stateflow clipboard object
sfclose Close chart
sfnew Create model containing empty Stateflow block
sfopen Open existing model
sfprint Print graphical view of charts
sfroot Root object
sfsave Save chart in current folder
sfhelp Open Stateflow online help
sflib Open Stateflow library window
stateflow Create empty chart


Overview of the Stateflow API

Introduces the Stateflow® API and how to use it to create and edit Stateflow charts

Properties and Methods Sorted By Chart Object

Sorts API properties and methods by object

Properties and Methods Sorted Alphabetically By Application

Sorts properties and methods alphabetically by application

Create and Access Charts Using the Stateflow API

Step-by-step instructions for constructing a Stateflow chart with the Stateflow API

Access the Properties and Methods of Objects

Describes the conventions used in naming the properties and methods of Stateflow API objects and the rules for using them in commands

Display Properties and Methods

Information on calling built-in methods for listing properties and methods for each object type

Create and Destroy API Objects

Information on creating and destroying any Stateflow object with the Stateflow API, and how to connect one object with another

Access Existing Stateflow Objects

Create handles to any object in an existing Stateflow chart and use them to manipulate actual Stateflow objects in a Stateflow chart

Move Graphical Objects

Learn how to move graphical objects in a chart programmatically

Copy Objects

Learn the copy and paste procedure for copying Stateflow objects from one environment to another

Zoom a Chart Object Using the API

Use the Stateflow API method fitToView to zoom in on a graphical object in the chart.

Access Graphical Properties and Methods Using the Editor Object

Access the Editor object for a Stateflow chart to perform operations that are graphical only, such as changing fonts and colors

Enter Multiline Labels

The Stateflow API provides two techniques to enter text with more than one line for the labels of states and transitions

Create Default Transitions

The Stateflow API provides two means for making default transitions

Make Supertransitions

Describes how to create supertransitions

Create a MATLAB Script of API Commands

You can execute your API commands in a single MATLAB® script

Was this topic helpful?