AddWatershedLayer
AddWatershedLayer adds a new watershed map layer to the specified MapFrame object. Returns a WatershedLayer object.
Syntax
object. AddWatershedLayer( Map, GridFileName )
Parameter |
Type |
Default |
Description |
Map |
MapFrame object |
required; This specifies the MapFrame object for the watershed map creation. |
|
GridFileName |
String |
required; This provides the grid data file |
Example
This example creates a contour map from the demogrid.grd sample file, then adds a watershed layer in the map with AddWatershedLayer.
'Create contour map
Dim MapFrame As Object
Set MapFrame = plot.Shapes.AddContourMap(GridFileName:=SurferApp.Path+"\Samples\demogrid.grd")
'Set ContourLayer reference to the contour layer
Dim ContourLayer As Object
Set ContourLayer = MapFrame.Overlays(1)
'Create watershed layer
Dim WatershedLayer As Object
Set WatershedLayer = plot.Shapes.AddWatershedLayer(Map:=MapFrame, GridFileName:=SurferApp.Path+"\Samples\demogrid.grd")
Used by: Shapes Collection