AddPostMap2

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

The AddPostMap2 command should be used instead of AddPostMap 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. AddPostMap2( DataFileName, xCol, yCol, LabCol, SymCol, AngleCol, DataFileOptions )

Parameter

Type

Default

Description

DataFileName

String

 

required; This provides the path and file name of the grid 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

LabCol

Long

 

optional; This provides the column containing point labels

SymCol

Long

 

optional; This provides the column containing symbol numbers

AngleCol

Long

 

optional; This provides the column containing symbol angles in degrees

DataFileOptions

String

""

optional; This parameter is used to specify the data import options

Remarks

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

The SymCol is the symbol or glyph number as it appears in the Symbol Properties dialog. This is the 0-based offset of the symbol within the symbol set.

Post map data files can contain a column defining which symbol set and symbol index to use for each posted point. This information can be specified in one of three ways:

SymbolSet:Index

This form allows both the symbol set and the symbol index to be specified. SymbolSet specifies the face name of the desired symbol set. The colon character must appear between the symbol set and the index. If the specified face name is invalid, the default symbol set specified in the Post Map Properties dialog is used instead.

Index

If a single integer is specified, it is interpreted as a symbol index into the current symbol set. The current symbol set is the last specified symbol set or the default symbol set specified in the Post Map Properties dialog.

<Empty>

If the cell is empty, the last specified symbol set and default symbol index is used.

Example 1

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

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

Set MapFrame = Doc.Shapes.AddPostMap2(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

See Also

PostLayer Object

Post Map Properties