AddSurfaceLayer

AddSurfaceLayer adds a new surface layer to a MapFrame object. Returns a Surface object.

Syntax

object. AddSurfaceLayer( Map, GridFileName )

Parameter

Type

Default

Description

Map

MapFrame

required; This specifies the MapFrame object to which the surface plot is added.

GridFileName

String

required; This provides the path and file name of the grid file.

Example 1

This example demonstrates how to create a contour map and coordinate system named MapFrame followed by its corresponding contour layer named ContourLayer from the grid file named demogrid.grd. It then creates a surface layer in the MapFrame with AddSurfaceLayer and names the layer Surface.

'declare MapFrame object and create a new contour map

Dim MapFrame As Object

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

 

'declare ContourLayer object and set the reference to the contour layer

Dim ContourLayer As Object

Set ContourLayer = MapFrame.Overlays(1)

 

'declare Surface object and add a 3D surface layer to the map

Dim Surface As Object

Set Surface = Shapes.AddSurfaceLayer(Map:=MapFrame, GridFileName:=SurferApp.Path+"\Samples\demogrid.grd")

Example 2

This script displays all the methods and properties in the Shapes collection.

Used by: Shapes collection

See Also

Surface Object