VectorLayer Object

The VectorLayer object contains the properties and methods of a 1-grid vector map or a 2-grid vector map created in Surfer with the Shapes method AddVectorLayer or AddVectorMap.

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 VectorLayer object:

Property

Description

AngleSystem

Returns the angle system for 2-grid polar vector maps. It is a read-only property.

AngleUnits

Returns the angle units for 2-grid polar vector maps. It is a read-only property.

AspectGrid

Returns the grid object used for aspects. It is a read-only property.

AspectGridFile

Returns the name of the grid file used for aspects in a 2-grid map. It is a read-only property.

ColorGrid

Returns the grid object used for color scaling. It is a read-only property.

ColorGridFile

Returns/sets the name of the grid file used for color scaling.

ColorMap

Returns the color map object. It is a read-only property.

ColorScale

Returns the color scale object if enabled. It is a read-only property.

ColorScaleMethod

Returns/sets the color scale method.

GradientGrid

Returns the grid object used for gradients. It is a read-only property.

GradientGridFile

Returns the name of the grid file used for gradients in a 2-grid map. It is a read-only property.

GridFile

Returns the name of the grid file used to create a single grid map. It is a read-only property.

GridXYZC

Returns the 3D grid being used for slices. It is a read-only propoerty.

GridXYZCFile

Returns/sets the name of the 3D grid files used to create the map.

MaxDataMagnitude

Returns the maximum magnitude of the input data. It is a read-only property.

MaxHeadLength

Returns the maximum head length in page units. It is a read-only property.

MaxMagnitude

Returns the maximum magnitude used for symbol scaling. It is a read-only property.

MaxShaftLength

Returns the maximum shaft length in page units. It is a read-only property.

MaxSymbolWidth

Returns the maximum symbol width in page units. It is a read-only property.

MinDataMagnitude

Returns the minimum magnitude of the input data. It is a read-only property.

MinHeadLength

Returns the minimum head length in page units. It is a read-only property.

MinMagnitude

Returns the minimum magnitude used for symbol scaling. It is a read-only property.

MinShaftLength

Returns the minimum shaft length in page units. It is a read-only property.

MinSymbolWidth

Returns the minimum symbol width in page units. It is a read-only property.

Opacity

Returns/sets the opacity.

ReverseVectors

Returns/sets the reverse vector orientation state.

ShowColorScale

Returns/sets the show color scale state.

ShowLegend

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

SliceZValue

Returns/sets the Z-value of the XYZC slice being used as the contour surface

Symbol

Returns/sets the arrow symbol index (1-based).

SymbolFill

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

SymbolLine

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

SymbolOrigin

Returns/sets the symbol origin.

SymbolScaleMethod

Returns/sets the symbol scaling method.

VecCoordSys

Returns the coordinate system for 2-grid vector maps. It is a read-only property.

xFrequency

Returns/sets the symbol frequency in the X direction.

yFrequency

Returns/sets the symbol frequency in the Y direction.

The following table provides the methods of the VectorLayer object:

Method

Description

SetInputGrids

Sets the input grids and coordinate system.

SetScaling

Sets the vector scaling parameters.

Example

The following script demonstrates how the VectorLayer 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 vector map and assigns the map coordinate system to the

'variable named "MapFrame"

Set MapFrame = Shapes.AddVectorMap(GridFileName1:=SurferApp.Path+"\Samples\demogrid.grd")

 

'Declares VectorLayer as an object

Dim VectorLayer As Object

 

'Assigns the vector map properties to the variable named "VectorLayer"

Set VectorLayer = MapFrame.Overlays(1)

 

End Sub