AddPostMap
The AddPostMap method is superseded by AddPostMap2. Please consider using the more recent version. AddPostMap has been retained for backward compatibility.
AddPostMap adds a new post map. Returns a MapFrame object.
The AddPostMap2 command should specifically 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.AddPostMap( DataFileName, xCol, yCol, LabCol, SymCol, AngleCol )
Parameter |
Type |
Required/ Optional |
Default |
Description |
DataFileName |
String |
Required |
|
This provides the path and file name of the grid file. |
xCol |
Long |
Optional |
1 (column A) |
This provides the column containing X coordinates |
yCol |
Long |
Optional |
2 (column B) |
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 |
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. If the symbol set is not Default Symbols, then 32 must be added to the index value obtained from the Symbol Properties dialog. This makes the symbol index the same as its ASCII code. You can use the Window’s Character Map utility to determine the ASCII code for font symbols.
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 how to create a map coordinate system named MapFrame followed by its corresponding post map named PostLayer from the data file named demogrid.dat.
Dim MapFrame As Object
Set MapFrame = Shapes.AddPostMap(DataFileName:=SurferApp.Path+\Samples\demogrid.dat)
Dim PostLayer As Object
Set PostLayer = MapFrame.Overlays(1)
Example 2
This script displays all the methods and properties in the Shapes collection.
Used by: Shapes collection