Export2 Method
The Export2 method exports the document to a specified graphics file. Returns a Boolean.
Syntax
object.Export2( file, selected, options, showProgress, filterID )
Parameter | Type | Description |
file | String | required, path and complete file name including extension |
selected | Variant | optional, export selected objects only, default = false |
options | Variant | optional, default = "" |
showProgress | Boolean | optional, false means do not display export progress bar |
filterID | String | conditional, filterID is required for file types that have more than one possible internal format |
Remarks
Include the file extension in the file parameter to indicate the file type. See the following links for more details on options.
PDF Vector Export Automation Options
PDF Raster Export Automation Options
Atlas Boundary [.BNA] Export Options
Esri Shapefile [.SHP] Export Options
Golden Software Blanking [.BLN] Export Options
Golden Software Interchange [.GSI] Export Options
MapInfo Interchange Format [.MIF] Export Options
-
FilterId is required if no recognized file extension is used in FileName, or if the file extension supplied can be used by more than one file format.
-
FilterId is case-sensitive. File extensions are case-insensitive.
-
If FilterId is used the file extension is optional.
-
The following table shows two common export options. These options apply to all filters.
Option | Action | Default | Description |
Defaults | 0 = No, use previously saved options 1 = Yes, set all options to defaults |
0 | Set all options to their default values. Any additional options specified in the option string are applied after the previously saved or default values are set. |
ForgetOptions | 0 = No, save the options for later use 1 = Yes, don't save options for later use |
0 | Don't remember options for later use. If set to 0, any previously saved options are overwritten with any new values specified in the option string. |
Example
This example demonstrates how to export a document as a PDF using bitmap export options.
Set Plot = GrapherApp.Documents.Open(GrapherApp.Path+"\Samples\line scatter plot.gpj")
Plot.Export2(GrapherApp.Path+"\Samples\line scatter plot.pdf",,,,"pdfi")
Used by: Document object