AddPostLayer
AddPostLayer adds a new post map layer to a specified MapFrame object. Returns a PostLayer Object.
Syntax
object. AddPostLayer( Map, DataFileName, xCol, yCol, LabCol, SymCol, AngleCol, DataFileOptions )
Parameter |
Type |
Default |
Description |
Map |
|
required; This specifies the MapFrame object to which the post map layer is added. |
|
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 adding a post map from an Excel sheet to an existing map object named MapFrame.
'Creates a post map from the sheet in the Excel workbook
Set PostLayer = Doc.Shapes.AddPostLayer(Map:=MapFrame, 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