OverlayMaps

The OverlayMaps command Overlays all maps in the selection. Returns a MapFrame object.

Syntax

object. OverlayMaps

Example

This example demonstrates how to overlay selected maps.

'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 "contour1"

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

 

'Creates a wireframe and assigns the map coordinate system to the variable named "wire"

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

 

'Selects both the contour map and the wireframe. This results

'with both objects also belonging to the Selection collection

Shapes.SelectAll

 

'Declares sel as object

Dim sel As Object

 

'Assigns the Selection collection to a variable named "sel"

Set sel = Plot.Selection

 

'Overlays the contour map and wireframe

sel.OverlayMaps

Used by: Selection collection