Stateflow |
 |
sfprint
Display the visible portion of a Stateflow diagram
Syntax
Description
The sfprint
method prints the visible portion of the specified Stateflow diagram. A read-only preview window appears while the print operation is in progress. An informational message box appears indicating that the printing operation is starting.
See Printing the Current Stateflow Diagram for information on printing Stateflow diagrams that are larger than the editor display area.
Arguments
objects
|
String name of a chart, model, system, or block. For a model or system, all member diagrams are printed. -or- Integer Id of a chart Can also be a cell array of any combination of the preceding objects or a vector of Id s.
|
format
|
Optional string specification of the destination for the visible portion of the specified Stateflow diagram, as follows:
'default' -- Default printer
'ps' -- PostScript file
'psc' -- Color PostScript file
'eps' -- Encapsulated PostScript file
'epsc' -- Color Encapsulated PostScript file
'tif' -- TIFF file.
'jpg' -- JPEG file.
'png' -- PNG file.
'meta' -- Save to the clipboard as a meta file (PC version only).
- `
'bitmap' -- Save to the clipboard as a bitmap file (PC version only).
If the format parameter is absent, the default format is 'ps' and output is directed to the default printer.
|
outputOption
|
Optional string specification of output with the following options:
- '
FileName ' -- Entered name of file to write to. This file is overwritten if more than one chart is printed.
'promptForFile' -- Filenames requested by prompt.
'printer' -- Output is sent to the default printer. Use only with 'default' , 'ps' , or 'eps' formats.
'file' -- Output is sent to a default file.
'clipboard' -- Output is copied to the clipboard.
If nothing is specified, output is sent to the default printer.
|
printEntireChart
|
Optional Boolean argument with the following two possible values:
- 1 -- Print the entire chart (default).
- 0 -- Print the current view of the specified charts.
|
Returns
None
Example
Assume that you have a Simulink model named myModel
loaded into MATLAB that has two charts named Chart1
and Chart2
. Further, both Chart1
and Chart2
are represented by the Stateflow API Chart objects ch1 and ch2, respectively.
Command
|
Result
|
sfprint('myModel')
|
Prints the visible portions of both Chart1 and Chart2 to the default printer.
|
sfprint('myModel' ,'ps')
|
Prints the visible portion of both Chart1 and Chart2 to a PostScript file.
|
sfprint(ch1.Id ,'psc')
|
Prints the visible portion of Chart1 to a color PostScript file.
|
sfprint([ch1.Id, ch2.Id])
|
Prints the visible portions of both Chart1 and Chart2 to the default printer.
|
| sfnew | | sfroot |  |