ClassedPostLayer Object

The ClassedPostLayer object contains the properties and methods for a classed post map created in Surfer with the Shapes method AddClassedPostLayer or AddClassedPostMap.

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 ClassedPostLayer object:

Property

Description

BinCount

Returns the number of data values in this bin. It is a read-only property

BinLowerLimit

Returns the lower limit of the specified bin. It is a read-only property.

BinningMethod

Returns/Sets the binning method.

BinPercent

Returns the percentage of data in this bin. It is a read-only property.

BinSymbol

Returns the symbol format object for the specified bin. It is a read-only property.

BinUpperLimit

Returns the upper limit of the specified bin. It is a read-only property.

DataFile

Returns/sets the name of the data file used to create the map.

FirstRow

Returns/sets the first row to use from the worksheet.

LabCol

Returns/sets the column containing the labels (0 if none).

LabelAngle

Returns/sets the label angle in degrees.

LabelFont

Returns the label font format object. It is a read-only property.

LabelFormat

Returns the label format object. It is a read-only property.

LabelLine

Returns the line format object for the label lines. It is a read-only property.

LabelLineLength

Returns/sets the label line length in page units.

LabelPlane

Returns/sets the label plane.

LabelPos

Returns/sets the label position method.

LabelXOffset

Returns/sets the label position offset in the X direction (page units).

LabelYOffset

Returns/sets the label position offset in the Y direction (page units).

LastRow

Returns/sets the last row to use from the worksheet.

Legend

Returns the legend object if enabled. It is a read-only property.

NumClasses

Returns/Sets the number of classes.

Opacity

Returns/sets the opacity.

ShowLegend

Returns/sets the show legend state.

SymAngle

Returns/sets the symbol angle in degrees.

SymFrequency

Returns/sets the symbol frequency.

xCol

Returns/sets the column containing the X coordinates (1-based).

yCol

Returns/sets the column containing the Y coordinates (1-based).

zCol

Returns/sets the column containing the Z coordinates (1-based).

The following table provides the methods of the ClassedPostLayer object:

Method

Description

LoadClasses

Loads a CLS class file

SetBinLimits

Sets the lower and upper limits of each bin (2 elements per bin).

SetInputData

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.

SetInputData2

Sets the input data file and columns. It can also be used to specify any data import options when loading a data file.

Example

The following script demonstrates how the ClassedPostLayer 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 classed post map and assigns the map coordinate system

'to the variable named "MapFrame"

Set MapFrame = Shapes.AddClassedPostMap(DataFileName:=SurferApp.Path+"\Samples\demogrid.dat")

 

'Declares ClassedPostLayer as an object

Dim ClassedPostLayer As Object

 

'Assigns the classed post map properties to the variable named

'"ClassedPostLayer"

Set ClassedPostLayer = MapFrame.Overlays(1)

 

End Sub