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, AddDataBaseLayer, AddDataBaseMap, 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.

ShowLegend

Returns/sets a top level legend object with base layer data.

Symbol

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

SymbologyClassedColorsBins

Returns a collection of classes that hold editable color, opacity, uppervalue, name, percent, and count. Percent and count are read-only properties.

SymbologyClassedSymbolsBins

Returns a collection of classes that hold editable symbol, uppervalue, name, percent, and count. Percent and count are read-only properties.

SymbologyColorMap

Returns the colormap of the specified type in SrfSymCMType

SymbologyUniqueValues

Returns a collection of unique values that hold editable line, symbol, and fill information. 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.

The following table provides the methods of the VectorBaseLayer object.

Method

Description

ApplySymbologyClassedColors

Specifies the attributes of the symbology's classed colors in the vector base layer object.

ApplySymbologyClassedSymbols

Specifies the attributes of the symbology's classed symbols in the vector base layer object.

ApplySymbologyUnclassedColors

Specifies the attributes for the symbology's unclassed colors in the vector base layer object.

ApplySymbologyUnclassedSymbols

Specifies the attributes used to define the symbology's unclassed symbols in the vector base layer object.

ApplySymbologyUniqueValues

Sets line, fill, and/or symbol properties for the symbology's unique values in the vector base layer.

RemoveSymbology()

Sets the symbology in the vector base layer to none.

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

See Also

Legend

PostLayer Object

Symbology

Vector Base Layer