Surface Object

The Surface object contains the properties of a surface created in Surfer with the Shapes method AddSurface. See MapFrame object for additional properties.

Derived from: Shape object (All methods and properties of Shape apply to this object.)

The following table provides the properties of the Surface object:

Property

Description

BaseFill

Returns the fill properties object for the base. It is a read-only property.

BaseLine

Returns the line properties object for the base. It is a read-only property.

BlankMissing

Returns/sets the flag to assign NoData to missing nodes.

ColorScale

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

Grid

Returns the grid object used to create the surface. 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.

LowerColor

Returns/sets the lower material color as an RGB value. The LowerColor property is superseded by the LowerColorRGBA property. LowerColor has been preserved for backwards compatibility.

LowerColorRGBA

Returns the lower color RGBA object. It is a read-only property.

MeshOffset

Returns/sets the surface offset factor.

ShowBase

Returns/sets the show base state.

ShowColorScale

Returns/sets the show color scale state.

ShowOverlays

Returns/sets the flag to show overlays on this surface.

SliceZValue

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

UpperColorMap

Returns the upper material color map object. It is a read-only property.

UpperShininess

Returns/sets the upper shininess as a percent.

xMeshFreq

Returns/sets the X mesh line frequency.

xMeshLine

Returns the line properties object for X mesh lines. It is a read-only property.

yMeshFreq

Returns/sets the Y mesh line frequency.

yMeshLine

Returns the line properties object for Y mesh lines. It is a read-only property.

zMissing

Returns/sets the Z value to use for missing nodes if BlankMissing is false.

Example

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.AddSurface(GridFileName:=SurferApp.Path+"\Samples\demogrid.grd")

 

'Declares SurfaceMap as an object

Dim SurfaceMap As Object

 

'Assigns the surface properties to the variable named "SurfaceMap"

Set SurfaceMap = MapFrame.Overlays(1)

 

End Sub