ArcObjects Library Reference  (Geometry)    

IPointCollection.AddPoint Method

Adds a vertex to a Path, Ring, Polyline, or Polygon; or adds a reference to the input point to a Multipoint, TriangleFan, or TriangleStrip.

[Visual Basic 6.0]
Sub AddPoint(
    ByVal inPoint As IPoint, _
    [before As Variant], _
    [after As Variant] _
)
[Visual Basic .NET]
Public Sub AddPoint ( _
    ByVal inPoint As IPoint, _
    [ByRef before As Object], _
    [ByRef after As Object] _
)
[C#]
public void AddPoint (
    IPoint inPoint,
    ref object before,
    ref object after
);
[C#]

Optional Values

before   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
after   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
[Java]
public void addPoint (
    IPoint inPoint,
    Object before,
    Object after
)
throws
    IOException,
    AutomationException
[C++]
HRESULT AddPoint(
  IPoint* inPoint,
  VARIANT* before,
  VARIANT* after
);
[C++]

Parameters

inPoint

  inPoint is a parameter of type IPoint

before [optional]

  before is a parameter of type VARIANT

  To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

after [optional]

  after is a parameter of type VARIANT

  To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Adds a Point to a PointCollection.  If before and after are omitted, the Point is added to the end of the PointCollection.  Additionally, by specifying either the before or after index, the Point can be added at a specific location in the PointCollection.

See Also

IPointCollection Interface

Example

IPointCollection_AddPoint_Example

 


Feedback Send feedback on this page