ContourLayer Object

The ContourLayer object contains the properties and methods for a contour map created in Surfer with the Shapes method AddContourLayer or AddContourMap.

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 ContourLayer Object.

Property

Description

BlankFill

Returns the fill format object for NoData regions. It is a read-only property.

BlankLine

Returns the line format object for NoData regions. It is a read-only property.

ColorScale

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

FaultLine

Returns the line format object for fault traces. It is a read-only property.

FillBackgroundColorMap

Returns the background fill color map for the Advanced level method. It is a read-only property.

FillContours

Returns/sets the fill contours state.

FillForegroundColorMap

Returns the foreground fill color map. It is a read-only property.

FillPattern

Returns/sets the fill pattern for the Advanced level method.

FillTransparent

Returns/sets the background transparency mode for the Advanced level method.

Grid

Returns the grid object used to create the map. It is a read-only property.

GridXYZC

Returns the 3D grid being used for slices. It is a read-only propoerty.

GridFile

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

GridXYZCFile

Returns/sets the name of the 3D grid files used to create the map.

HachClosedOnly

Returns/sets the hachure closed contours only state for the Advanced level method.

HachDirection

Returns/sets the hachure direction for the Advanced level method.

HachLength

Returns/sets the hachure length in page units for the Advanced level method.

LabelEdgeDist

Returns/sets the minimum label to map edge distance in page units for the Advanced level method.

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.

LabelLabelDist

Returns/sets the minimum label to label distance in page units for the Advanced level method.

LabelTolerance

Returns/sets the label curve tolerance (must be > 1) for the Advanced level method.

LevelInterval

Returns the contour interval for the Simple level method. It is a read-only property.

LevelMajorInterval

Returns/sets the major contour level frequency for the Simple level method.

LevelMaximum

Returns the maximum contour level for the Simple or Logarithmic level method. It is a read-only property.

LevelMethod

Returns/sets the contour level method.

LevelMinimum

Returns the minimum contour level for the Simple or Logarithmic level method. It is a read-only property.

Levels

Returns the Contour Levels object for use with the Advanced level method. It is a read-only property.

LevelsInDecade

Returns the number of minor levels in each decade for the Logarithmic level method. It is a read-only property

MajorLine

Returns the major contour line LineFormat object for the Simple and Logarithmic level methods. It is a read-only property.

MinorLine

Returns the minor contour line LineFormat object for the Simple and Logarithmic level methods. It is a read-only property.

Opacity

Returns/sets the opacity.

OrientLabelsUphill

Returns/sets the orient labels uphill state.

ShowColorScale

Returns/sets the show color scale state.

ShowMajorLabels

Returns/sets the show major contour labels state for the Simple and Logarithmic level methods.

ShowMinorLabels

Returns/sets the show minor contour labels state for the Simple and Logarithmic level methods.

SliceZValue

Returns/sets the Z-value of the XYZC slice being used as the contour surface

SmoothContours

Returns/sets the smooth contours method.

The following table provides the methods of the ContourLayer object.

Method

Description

ApplyFillToLevels

Applies the current fill attributes to the level list.

ExportContours

Exports contour lines in a DXF, SHP, or TXT file.

SetLogarithmicLevels

Sets the logarithmic contour levels minimum, maximum, and minor levels per decade.

SetSimpleLevels

Sets the simple contour levels minimum, maximum, contour interval, and major contour frequency.

Remarks

When the ContourLayer object is initialized, the level method is changed to Advanced.

Example

The following script demonstrates how the ContourLayer 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 contour map and assigns the map coordinate system to

'the variable named "MapFrame"

Set MapFrame = Shapes.AddContourMap(GridFileName:=SurferApp.Path+"\Samples\demogrid.grd")

 

'Declares ContourLayer as an object

Dim ContourLayer As Object

 

'Assigns the contour map properties to the variable named

'"ContourLayer"

Set ContourLayer = MapFrame.Overlays(1)

 

End Sub