sfprint
Print Stateflow charts
Syntax
Description
sfprint
prints the current chart to the default printer.
sfprint(
prints charts to the specified source
,format
,destination
)destination
.
sfprint(
specifies whether to print the complete or current view of the charts.source
,format
,destination
,wholeChart
)
Examples
Print open chart
sfprint
Prints the current chart to the default printer.
Print all charts specified in path
sfprint("sf_car/shift_logic");
Prints the chart with the path sf_car/shift_logic
to
the default printer.
Print chart specified in path to a JPG file format.
sfprint("sf_car/shift_logic","jpg")
Prints the chart sf_car/shift_logic
in JPG format to
the file sf_car_shift_logic.jpg
.
Print chart in TIFF format to the clipboard.
sfprint(gcs,"tiff","clipboard")
Prints the chart in the current system to the clipboard in TIFF format.
Print the current view of a chart.
sfprint("sf_car/shift_logic","png","file",0)
Prints the current view of sf_car/shift_logic
in a PNG
format to the file sf_car_shift_logic.png
.
Input Arguments
source
— Source of charts to print
string scalar | character vector | vector of string scalars | cell array of character vectors
Source of charts to print, specified as a string scalar or character
vector that contains the path of a chart, model, subsystem, or block. To
specify multiple paths, use a vector of string scalars or cell array of
character vectors. To specify the current block or system of the model, use
gcb
(Simulink) or gcs
(Simulink).
Example: sfprint(gcs)
prints all the charts in the
current system to the default printer.
Example: sfprint("sf_pool/Pool")
prints the chart
sf_pool/Pool
to the default printer.
Data Types: string
| char
format
— Output format
"bitmap"
| "jpg"
| "meta"
| "pdf"
| "png"
| "svg"
| "tiff"
Output format of the printed charts specified as one of these values:
"bitmap"
— Save the chart image to the clipboard as a bitmap (for Windows® operating systems only)."jpg"
— Generate a JPEG file."meta"
— Save the chart image to the clipboard as an enhanced metafile (for Windows operating systems only)."pdf"
— Generate a PDF file."png"
— Generate a PNG file."svg"
— Generate an SVG file."tiff"
— Generate a TIFF file
Example: sfprint("sf_car/shift_logic","jpg")
prints the
chart sf_car/shift_logic
to a JPEG file named
sf_car_shift_logic.jpg
in the current
folder.
Example: sfprint("sf_bounce/BouncingBall","meta","myImage")
prints the chart sf_bounce/BouncingBall
as an enhanced
metafile named myImage.emf
in the current folder.
destination
— Destination for printed charts
"file"
(default) | "clipboard"
| "printer"
| "promptForFile"
| string scalar | character vector
Destination for printed charts, specified as one of these values:
"file"
— Send output to a file with the default name
, where the file name is the name of the chart and the file extension that matches the output format.chart_name
.file_extension
"clipboard"
— Copy output to the clipboard."printer"
— Send output to the default printer. Use only with"ps"
or"eps"
formats."promptForFile"
— Prompt for path and file name.
Alternatively, you can specify the name of the output file by using a string scalar or character vector.
Example: sfprint("sf_car/shift_logic","png","myFile")
prints the chart sf_car/shift_logic
to a PNG file named
myFile.png
in the current folder.
Example: sfprint(gcb,"pdf","promptForFile")
prints all
charts in the current block of the model in PDF format. A dialog box prompts
you for the path and name of the output file for each chart.
Data Types: string
| char
wholeChart
— Whether to print complete charts
true
or 1 (default) | false
or 0
Whether to print the complete charts, specified as a numeric or logical 1
(true
) or 0 (false
).
true
— Print the complete views of the specified charts.false
— Print the current views of the specified charts.
Example: sfprint(gcs,"png","file",0)
prints the current
view of the charts in the current system in PNG format using default file
names.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)