AddVectorBaseLayer

AddVectorBaseLayer adds a new base (vector) layer to the specified MapFrame object. Returns a BaseLayer object. The AddVectorBaseLayer method creates a base (vector) layer. To create a base map from a raster image, use AddRasterBaseLayer.

Syntax

object. AddVectorBaseLayer( Map, ImportFileName, ImportOptions )

Parameter

Type

Default

Description

Map

MapFrame

required; It specifies the MapFrame object in which the base layer is added.

ImportFileName

String

required; It provides the path and file name including the file extension. An error is returned if a raster image file is specified.

ImportOptions

String

""

optional; It provides the import options string. See below for specific options for the various file types.

Remarks

ImportFileName must include a file extension. See the following links for more details on ImportOptions.

Extension

File Type

BLN

Golden Software Blanking [.BLN]

BNA

Atlas Boundary [.BNA]

DICOM3

Medical Image [.DIC] [.DCM]

DDF SDTS

Topological Vector Profile [.DDF]

DLG USGS

Digital Line Graph [.DLG] [.LGO] [.LGS]

DXF

AutoCAD Drawing [.DXF]

E00

Esri ArcInfo Export Format [.E00]

EMF

Windows Enhanced Metafile [.EMF]

GSB

Golden Software Boundary [.GSB]

GSI

Golden Software Interchange File [.GSI]

MIF

MapInfo Interchange Format [.MIF]

PDF

Adobe Portable Document Format [.PDF]

PLT

Golden Software PlotCall [.PLT]

PLY

Stanford [.PLY]

SHP

Esri Shapefile [.SHP]

VTK

Visualization Toolkit [.VTK]

WMF

Windows Metafile [.WMF]

Example 1

This example demonstrates how to create a contour map coordinate system named MapFrame followed by its corresponding contour map named ContourLayer from the grid file named Diablo.grd. It then adds the base layer in the same map frame with the AddBaseLayer method.

'declare the MapFrame object and create a new map frame

Dim MapFrame As Object

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

 

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

Dim ContourLayer As Object

Set ContourLayer = MapFrame.Overlays(1)

 

'declare the VectorBaseLayer object and create a new base layer

Dim VectorBaseLayer As Object

Set VectorBaseLayer = Shapes.AddVectorBaseLayer(Map:= MapFrame, _

ImportFileName:=SurferApp.Path+"\Samples\DemoRect.bln")

Example 2

This example demonstrates how to add a base layer to a map while specifying file import options.

'create a new base layer

Plot.Shapes.AddVectorBaseLayer(Map:= MapFrame, _

ImportFileName:=SurferApp.Path+"\Samples\CO2010.GSB",ImportOptions:="AreasToCurves=1")

Example 3

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

Used by: Shapes collection

See Also

VectorBaseLayer Object

RasterBaseLayer Object

Base Map