AddClassedPostMap2

AddClassedPostMap2 adds a new classed post map and can be used to specify the DataFileOptions parameter. Returns a MapFrame object.

The AddClassedPostMap2 command should be used instead of AddClassedPostMap when the worksheet being loaded is an Excel file where the sheet name needs to be specified. It can also be used to specify any data import options when loading a data file.

Syntax

object. AddClassedPostMap2( DataFileName, xCol, yCol, zCol, LabCol, DataFileOptions )

Parameter

Type

Default

Description

DataFileName

String

required; This provides the XYZ data file

xCol

Long

1 (column A)

optional; This provides the column containing X coordinates

yCol

Long

2 (column B)

optional; This provides the column containing Y coordinates

zCol

Long

3 (column C)

optional; This provides the column containing the class information

LabCol

Long

optional; This provides the column containing labels

DataFileOptions

String

""

optional; This parameter is used to specify data import options

Remarks

Default=0 means use the default column. xCol defaults to column A , yCol defaults to column B, and zCol defaults to column C. LabCol defaults to none. Worksheet column numbers begin with 1. This means that column A = 1, column B = 2, etc.

Example 1

This example demonstrates creating a classed post map from an Excel sheet.

'Creates a classed post map from the sheet in the Excel workbook

Set Map2 = Doc.Shapes.AddClassedPostMap2(DataFileName:="c:\temp\book1.xlsx", _

DataFileOptions:="sheet=sheet2")

Example 2

This script displays all the methods and properties in the Shapes collection.

Used by: Shapes collection