Saves an object to a file-system file.
SaveToFile(X[, fn[, options ...]])
Xis any object
fnis a string
options ...is any number of options of the form
X is any object and
fn a valid, fully-qualified file name, then
SaveToFile(X, fn) saves
X to the file given by
fn, overwriting any already existing file with this path and name.
The type and format of file created depends on the type of
Pixmaps are saved as raster image files. The file format is determined by the extension part of
fn. Allowed extensions are
Sounds are saved as PCM waveform audio files. Sample rate and bit depth are the same as in
Binary data objects are saved as binary files.
Xis a reference to a visual object, the diagram containing the visual object is saved as a Scalable Vector Graphics (SVG) image file.
For all other types,
string(X)is saved as a text file.
If the file name is omitted, a standard dialog box is shown prompting for a file name.
X is a reference to a visual object, the following SVG export options may be specified:
width: a valid SVG length string (e.g. "60", "10cm", or "100%")
height: a valid SVG length string
stretch: a boolean
title: a string
description: a string
If one of
height is specified – but not both – the other will automatically be chosen in such a way that the aspect ratio is preserved. If both are left unspecified, the diagram’s current or last on-screen size is used. If both are specified, they determine the size of the SVG image. However, the SVG will be scaled proportionally, respecting its aspect ratio, unless
stretch is explicitly set to
export is a synonym for