sfprint

Print graphical view of charts

Description

example

sfprint prints the current chart to the default printer.

example

sfprint(objects) prints all charts specified by objects to the default printer.

example

sfprint(objects,format) prints all charts specified by objects in the specified format to output files. Each output file matches the name of the chart and the file extension matches the format.

example

sfprint(objects,format,outputOption) prints all charts specified by objects in the specified format to the file or printer specified in outputOption.

example

sfprint(objects,format,outputOption,wholeChart) prints all charts specified by objects in the specified format to the file or printer specified in outputOption. As specified in wholeChart, prints either a complete or current view.

Examples

collapse all

sfprint

Prints current chart to the default printer.

sfprint('sf_car/shift_logic');

Prints the chart with the path ‘sf_car/shift_logic’ to the default printer.

sfprint('sf_car/shift_logic','jpg')

Prints a copy of the chart ‘sf_car/shift_logic’ in JPG format to the file ‘sf_car_shift_logic.jpg’.

sfprint(gcs,'tiff','clipboard')

Prints the chart in the current system to the clipboard in TIFF format.

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

collapse all

Identifier of charts to print. Use:

  • gcb to specify the current block of the model.

  • gcs to specify the current system of the model.

  • a character vector to specify the path of a chart, model, subsystem, or block.

Example: sfprint(gcs)

Prints all the charts in the current system to the default printer.

Example: sfprint('sf_pool/Pool')

Prints the complete chart with the path 'sf_pool/Pool' to the default printer.

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 complete chart 'sf_car/shift_logic' in a JPEG format to a file in the current folder named 'sf_car_shift_logic.jpg'.

Example: sfprint('sf_bounce/BouncingBall','meta','myImage')

Prints the complete chart 'sf_bounce/BouncingBall' as an enhanced metafile in the current folder named 'myImage.emf'.

Data Types: char

Name of the output file or printer specified as one of these values:

'file'

Send output to a default file with the name chart_name.file_extension. The file name is the name of the chart, with an extension that matches the output format.

character vector

Specify the name of the output file with a character vector.

'clipboard'

Copy output to the clipboard

'promptForFile'

Prompts the user interactively for path and file name.

'printer'

Send output to the default printer (use only with 'ps', or 'eps' formats)

Example: sfprint('sf_car/shift_logic','png','myFile')

Prints the complete chart whose path is 'sf_car/shift_logic' in the PNG format to a file in the current folder with the name 'myFile'.png.

Example: sfprint('sf_car/shift_logic,'pdf','promptForFile')

Prints all charts in the current block of the model in PDF format. A dialog box opens for each chart to prompt you for the path and name of the output file.

Data Types: char

View of charts to print specified as a integer of value 0 or 1. A value of 1 prints the complete views of all the charts, whereas a value of 0 prints the current views of all the charts.

Example: sfprint(gcs,'png','file',0)

Prints the current view of all charts in the current system in PNG format using default file names.

See Also

| | | | |

Introduced before R2006a