Import2 - Automation

The Import method imports a graphic file. Returns a Shape object.

Syntax

object.Import2( FileName, Options, FilterId )

Parameter

Type

Required/

Optional

Default

Description

FileName

String

Required

 

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

Options

String

Optional

""

See the Import FilterID page for the import options available for specific formats.

FilterId

String

Optional

""

FilterId specifies the file format extension if the extension entered for FileName is unknown.

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 import options. These options apply to all filters. See Import 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 import a Golden Software boundary file.

Plot.Import2(FileName:=SurferApp.Path+"\Samples\ca2010.gsb", _

Options:="Defaults=1" , FilterId:= "gsb")

Example 2

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

Used by: PlotDocument object