InsertAt Method (IPointList2 interface)

                  

 

Inserts an element into unsorted PointList at a specified position.

 

Syntax

object.InsertAt item, index

 

The InsertAt method syntax has these parts:

Part

Description

object

An object expression that evaluates to a IPointList2 interface.

item

A VARIANT . This is described under Remarks below.

index

An integer that specifies the insert position (1 to listsize)

 

Remarks

PointLists are normally constructed in insertion order, i.e new items are appended to the unsorted list. This method allows users to create a list in an arbitrary order or to change the current order.

This call will fail if the list is currently sorted, i.e. the Sorting property is not set to soUnordered.

 

The item argument can be any of the following VARIANT types:

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error Description
pseDUPLICATENAME Item already in the list.
DISP_E_TYPEMISMATCH Unsupported input VARIANT type
pseOUTOFRANGE Index of of range

Enabling Operational Intelligence