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 |
Returns the fill format object for NoData regions. It is a read-only property. |
|
Returns the line format object for NoData regions. It is a read-only property. |
|
Returns the color scale object if enabled. It is a read-only property. |
|
Returns the line format object for fault traces. It is a read-only property. |
|
Returns the background fill color map for the Advanced level method. It is a read-only property. |
|
Returns/sets the fill contours state. |
|
Returns the foreground fill color map. It is a read-only property. |
|
Returns/sets the fill pattern for the Advanced level method. |
|
Returns/sets the background transparency mode for the Advanced level method. |
|
Returns the grid object used to create the map. It is a read-only property. |
|
Returns the 3D grid being used for slices. It is a read-only propoerty. |
|
Returns/sets the name of the grid file used to create the map. |
|
Returns/sets the name of the 3D grid files used to create the map. |
|
Returns/sets the hachure closed contours only state for the Advanced level method. |
|
Returns/sets the hachure direction for the Advanced level method. |
|
Returns/sets the hachure length in page units for the Advanced level method. |
|
Returns/sets the minimum label to map edge distance in page units for the Advanced level method. |
|
Returns the label font format object. It is a read-only property. |
|
Returns the label format object. It is a read-only property. |
|
Returns/sets the minimum label to label distance in page units for the Advanced level method. |
|
Returns/sets the label curve tolerance (must be > 1) for the Advanced level method. |
|
Returns the contour interval for the Simple level method. It is a read-only property. |
|
Returns/sets the major contour level frequency for the Simple level method. |
|
Returns the maximum contour level for the Simple or Logarithmic level method. It is a read-only property. |
|
Returns/sets the contour level method. |
|
Returns the minimum contour level for the Simple or Logarithmic level method. It is a read-only property. |
|
Returns the Contour Levels object for use with the Advanced level method. It is a read-only property. |
|
Returns the number of minor levels in each decade for the Logarithmic level method. It is a read-only property |
|
Returns the major contour line LineFormat object for the Simple and Logarithmic level methods. It is a read-only property. |
|
Returns the minor contour line LineFormat object for the Simple and Logarithmic level methods. It is a read-only property. |
|
Returns/sets the opacity. |
|
Returns/sets the orient labels uphill state. |
|
Returns/sets the show color scale state. |
|
Returns/sets the show major contour labels state for the Simple and Logarithmic level methods. |
|
Returns/sets the show minor contour labels state for the Simple and Logarithmic level methods. |
|
Returns/sets the Z-value of the XYZC slice being used as the contour surface |
|
Returns/sets the smooth contours method. |
The following table provides the methods of the ContourLayer object.
Method |
Description |
Applies the current fill attributes to the level list. |
|
Exports contour lines in a DXF, SHP, or TXT file. |
|
Sets the logarithmic contour levels minimum, maximum, and minor levels per decade. |
|
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