PostLayer Object
The PostLayer object contains the properties and methods for a post map created in Surfer with the Shapes method, AddPostLayer or AddPostMap.
Derived from: Layer object, which is derived from Shape object(All methods and properties of Layer and Shape apply to this object.)
The following table provides the properties of the PostLayer object:
Property |
Description |
Returns/sets the active label set. |
|
Returns/sets the column containing the symbol angle in degrees (0 if none). |
|
Returns/sets the name of the data file used to create the map. |
|
Returns/sets the first row to use in the worksheet |
|
Returns the worksheet column containing the heights for proportional scaling. It is a read-only property. |
|
Returns/sets the column containing the labels (0 if none). |
|
Returns/sets the label angle in degrees. |
|
Returns the label font format object. It is a read-only property. |
|
Returns the label format object. It is a read-only property. |
|
Returns the line format object for the label lines. It is a read-only property. |
|
Returns/sets the label line length in page units. |
|
Returns/sets the label plane. |
|
Returns/sets the label position method. |
|
Returns/sets the label position offset in the X direction (page units). |
|
Returns/sets the label position offset in the Y direction (page units). |
|
Returns/sets the last row to use in the worksheet. |
|
Returns/sets the number of label sets. |
|
Returns/sets the opacity. |
|
Returns the first proportional scaling value (height column units). It is a read-only property. |
|
Returns the second proportional scaling value (height column units). It is a read-only property. |
|
Returns/sets a top level legend object with base layer data. |
|
Returns/sets the symbol angle in degrees. |
|
Returns the symbol format object. It is a read-only property. |
|
Returns/sets the symbol color column. |
|
Returns the ColorMap object when using a symbol color column. It is a read-only property. |
|
Returns/sets the symbol color method when using a symbol color column. |
|
Returns the symbol height when the data equals ScaleValue1 (page units). It is a read-only property. |
|
Returns the symbol height when the data equals ScaleValue2 (page units). It is a read-only property. |
|
Returns/sets the column containing the symbol type (0 if none). |
|
Returns/sets the symbol frequency. |
|
Returns the symbol scaling method. It is a read-only property. |
|
Returns/sets the column containing the X coordinates (1-based). |
|
Returns/sets the column containing the Y coordinates (1-based). |
The following table provides the methods of the PostLayer object:
Method |
Description |
Removes a specified label set. |
|
Sets the input data file and columns. The SetInputData2 method should be used instead of this method when the worksheet being loaded is an Excel file where the sheet name needs to be specified. |
|
Sets the input data file and columns. It can also be used to specify any data import options when loading a data file. |
|
Sets the symbol scaling parameters. |
Remarks
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
The following script demonstrates how the PostLayer object is used in reference to the MapFrame object.
Sub Main
'Declares SurferApp as an object
Dim SurferApp As Object
'Creates an instance of the Surfer Application object and assigns it to
'the variable named "SurferApp"
Set SurferApp = CreateObject("Surfer.Application")
'Makes Surfer visible
SurferApp.Visible = True
'Declares Plot as an object
Dim Plot As Object
'Creates a plot document in Surfer and assigns it to the variable named
'"Plot"
Set Plot = SurferApp.Documents.Add(srfDocPlot)
'Declares Shapes as an object
Dim Shapes As Object
'Assigns the Shapes collection to the variable named "Shapes"
Set Shapes = Plot.Shapes
'Declares MapFrame as an object
Dim MapFrame As Object
'Creates a post map and assigns the map coordinate system to the
'variable named "MapFrame"
Set MapFrame = Shapes.AddPostMap(DataFileName:=SurferApp.Path+"\Samples\demogrid.dat")
'Declares PostLayer as an object
Dim PostLayer As Object
'Assigns the post map properties to the variable named "PostLayer"
Set PostLayer = MapFrame.Overlays(1)
End Sub