VectorBaseLayer Object

The VectorBaseLayer object contains the properties and methods for a base (vector) map layer created in Surfer with the Shapes method AddVectorBaseLayer, AddVectorBaseMap, AddEmptyBaseLayer, or AddEmptyBaseMap.

Derived from: Layer object, which is derived from Shape object (All methods and properties of Layer and Shape apply to this object.)

The following table provides the properties of the VectorBaseLayer object.

Property

Description

FileName

Returns/sets the name of the file used to create the base map.

Fill

Returns the fill format object. It is a read-only property.

Font

Returns the font format object. It is a read-only property.

Line

Returns the line format object. It is a read-only property.

Opacity

Returns/sets the opacity.

Shapes

Returns the Shapes collection of the base map.

Symbol

Returns the symbol format object. It is a read-only property.

xMax

Returns the maximum X coordinate in map units. It is a read-only property.

xMin

Returns the minimum X coordinate in map units. It is a read-only property.

yMax

Returns the maximum Y coordinate in map units. It is a read-only property.

yMin

Returns the minimum Y coordinate in map units. It is a read-only property.

Remarks

Not all of methods and properties can be changed for objects within a base layer. However, the Shapes property can be used to set the following methods and properties:

  • All the properties/methods for the polyline, polygon, point, text, metafile, bitmap, spline polyline,ellipse, rectangle, and rounded rectangle objects in a base layer.

  • The Name, Visible, Type, and SetZOrder properties for shapes in the base layer.

  • The Shapes property can use the BreakApart method to break apart a composite object in a base layer.

Example

The following script demonstrates how the VectorBaseLayer object is used in reference to the MapFrame object.

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 base map and assigns the map coordinate system to the

'variable named "MapFrame"

Set MapFrame = Shapes.AddBaseMap(ImportFileName:=SurferApp.Path+"\Samples\ca2010.gsb")

 

'Declares VectorBaseLayer as an object

Dim VectorBaseLayer As Object

 

'Assigns the base map properties to the variable named "VectorBaseLayer"

Set VectorBaseLayer = MapFrame.Overlays(1)

 

End Sub