AddLine

AddLine is superceded by AddPolyline2. Consider using AddPolyline2 instead. AddLine has been retained for backward compatibility.

AddLine adds a new line segment. Returns a Polyline object.

Syntax

object.AddLine( xBeg, yBeg, xEnd, yEnd )

Parameter

Type

Required/

Optional

Default

Description

xBeg

Double

Required

 

This provides the beginning X coordinate in page units

yBeg

Double

Required

 

This provides the beginning Y coordinate in page units

xEnd

Double

Required

 

This provides the ending X coordinate in page units

yEnd

Double

Required

 

This provides the ending Y coordinate in page units

Remarks

Page units or map coordinates are used to specify the parameter coordinates. When the line is added to the plot, use page units for the parameters. When the line is added to a map layer, use map coordinates to specify the parameters.

Example 1

This example demonstrates how to create a line.

Dim Line As Object

Set Line = Shapes.AddLine(xBeg:=1, yBeg:=7, xEnd:=4, yEnd:=3)

Example 2

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

Used by: Shapes collection

See Also

AddPolyline

AddPolyline2