ExportArea

The ExportArea method exports only a specific region of the plot document. The ExportArea method is similar to the Current view only option in the Export dialog. However, the ExportArea uses coordinates to specify the exported region's extents.

Syntax

object. ExportArea( FileName, Left, Top, Right, Bottom, SelectionOnly, Options, FilterId )

Parameter

Type

Required/

Option

Default

Description

FileName

String

Required

 

This provides the path and file name of the file to be exported.

Left

Double

Required

 

The left coordinate of the export region in page units.

Top

Double

Required

 

The top coordinate of the export region in page units.

Right

Double

Required

 

The right coordinate of the export region in page units.

Bottom

Double

Required

 

The bottom coordinate of the export region in page units.

SelectionOnly

Boolean

Optional

False

This specifies whether to export selected objects, or the entire plot.

Options

String

Optional

""

See the Export Filter ID and Options page for the export options available for specific formats.

FilterId

String

Optional

""

FilterId specifies the file format extension if the extension entered for FileName is unknown. See the Export Filter ID and Options page for the export options available for specific formats.

Remarks

1. 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.

2. FilterId is case-sensitive. File extensions are case-insensitive.

3. If FilterId is used the file extension is optional.

4. The following table shows two common export options. These options apply to all filters. See Export FilterID for all options.

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 1

This example demonstrates how to export a portion of the plot document as a .dxf using export options.

Plot.ExportArea(FileName:="C:\Temp\ExportView-AutoTest22.dxf", Left:=0.5, top:=6, _

Right:=3.5, Bottom:=3, Options:="FormatASCII=0, AllTextToAreas=1")

Example 2

This script displays all the methods and properties in the PlotDocument object.

Used by: PlotDocument object