Curve Object

 

The Curve object contains the properties of a curve. Curves are created with the AddPolyLine method.

 

Derived from: Shape object (All methods and properties of Shape apply to this object.)

 

Properties

ArrowScale

EndArrow

Line

Length

StartArrow

Vertices

Vertices2

 

Example

The following script demonstrates how the Curve object is used.

 

Sub Main

'Declares mvApp as an object

 Dim mvApp As Object

 

'Creates an instance of the MapViewer Application object

'and assigns it to the variable named "mvApp"

 Set mvApp = CreateObject("MapViewer.Application")

 

'Makes MapViewer visible

 mvApp.Visible = True

 

'Declares Plot as an object

 Dim Plot As Object

 

'Creates a map document in MapViewer and assigns

'it to the variable named "Plot"

 Set Plot = mvApp.Documents.Add(mvDocPlot)

 

'Declares PlotLayers as an object

 Dim PlotLayers As Object

 

'Assigns the map document layers to the

'variable named "PlotLayers"

 Set PlotLayers = Plot.Layers

 

'Declares CurrentLayer as an object

 Dim CurrentLayer As Object

 

'Assigns the active plot layer to the

'variable named "CurrentLayer"

 Set CurrentLayer = PlotLayers.ActiveLayer

 

'Assign the shapes collection to the

'variable named "MapShapes"

 Set MapShapes = CurrentLayer.Shapes

 

'Declares Curve as an object

 Dim Curve As Object

 

'Declares CurveArray as a double array

 Dim CurveArray(5) As Double

 

 CurveArray(0) = 4: CurveArray(1) = 1

 CurveArray(2) = 7: CurveArray(3) = 3

 CurveArray(4) = 2: CurveArray(5) = 6

 

'Creates a curve and assigns it to the

'variable named "Curve"

 Set Curve = MapShapes.AddPolyLine(bSpline:=False, _

 Vertices:=CurveArray)

End Sub