IRouteWaypoints81 

This interface gives access to all of a route’s waypoints, providing methods to add, modify, and delete waypoints and retrieve information about them.

Note:     When IRouteWaypoints81 represents the waypoints of a dynamic object, the IRouteWaypoint81 orientation properties (Yaw, Pitch, Roll) are ignored.

Properties

Count

Gets the number of waypoints in the route.

Current

Gets the current playing route waypoint. The last waypoint passed through is reported.

Item

Gets the IRouteWaypoint81 element in the specified zero-based index.

Methods

AddWaypoint

Adds a waypoint to the end of a route.

DeleteWaypoint

Deletes a waypoint from the route.

FromArray

Converts an array of waypoints to a route.

GetWaypoint

Retrieves waypoint data.

InsertWaypoint

Inserts a waypoint at a specified point in the route.

ModifyWaypoint

Modifies a waypoint’s properties.

ToArray

Returns an array containing all of the waypoints in the collection.

Count

Gets the number of waypoints in this presentation route.

JavaScript

Count

C#

int Count { get; }

C++

HRESULT Count([out, retval] long* pVal)

Current

Gets the current playing route waypoint. The last waypoint passed through is reported.

JavaScript

Current

C#

int Current { get; }

C++

HRESULT Current([out, retval] long* pVal)

Item

Gets the IRouteWaypoint81 element in the specified zero-based index.

To access a specific element use the following syntax: IRouteWaypoints81(index).

C# exposes this property as an indexer accessed using the following syntax: IRouteWaypoints81[index].

JavaScript

Item(

       Index)

C#

dynamic this[object Index] { get; }

C++

HRESULT Item(

       [in] VARIANT Index,

       [out, retval] VARIANT* pVal)

AddWaypoint

Adds a waypoint to the end of a route.

JavaScript

AddWaypoint(

       pWaypoint)

C#

void AddWaypoint(

       IRouteWaypoint81 pWaypoint)

C++

HRESULT AddWaypoint(

       IRouteWaypoint81* pWaypoint)

Parameters

pWaypoint

An IRouteWaypoint81 representing the added waypoint.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

DeleteWaypoint

Deletes a waypoint from the route.

JavaScript

DeleteWaypoint(

       Index)

C#

void DeleteWaypoint(

       int Index)

C++

HRESULT DeleteWaypoint(

       long Index)

Parameters

Index

The zero-based index of the route waypoint to be deleted. Use Count to determine the number of waypoints.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

FromArray

Converts an array of waypoints to a route.

JavaScript

FromArray(

       Waypoints)

C#

void FromArray(

       object Waypoints)

C++

HRESULT FromArray(

       VARIANT Waypoints)

Parameters

Waypoints

An array of IRouteWaypoint81 objects.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

GetWaypoint

Retrieves waypoint data through an interface to the waypoint object.

JavaScript

GetWaypoint(

       Index)

C#

IRouteWaypoint81 GetWaypoint(

       int Index)

C++

HRESULT GetWaypoint(

       long Index,

       IRouteWaypoint81** pWaypoint)

Parameters

Index

A zero-based index of the waypoint for which to retrieve data.

Return Value

pWaypoint

An IRouteWaypoint81 representing the queried waypoint.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

InsertWaypoint

Inserts a waypoint at a specified point in the route.

JavaScript

InsertWaypoint(

       IndexInsertAfter,

       pWaypoint)

C#

void InsertWaypoint(

       int IndexInsertAfter,

       IRouteWaypoint81 pWaypoint)

C++

HRESULT InsertWaypoint(

       long IndexInsertAfter,

       IRouteWaypoint81* pWaypoint)

Parameters

IndexInsertAfter

The zero-based index of the waypoint after which the new waypoint should be inserted.

Note:     In order to insert a new waypoint before the first waypoint, set IndexInsertAfter to -1.

pWaypoint

An IRouteWaypoint81 representing the inserted waypoint.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

ModifyWaypoint

Modifies a waypoint’s properties through an interface to the waypoint object.

JavaScript

ModifyWaypoint(

       Index,

       pWaypoint)

C#

void ModifyWaypoint(

       int Index,

       IRouteWaypoint81 pWaypoint)

C++

HRESULT ModifyWaypoint(

       long Index,

       IRouteWaypoint81* pWaypoint)

Parameters

Index

The zero-based index of the waypoint that the client wants to modify.

pWaypoint

An IRouteWaypoint81 representing the waypoint to modify.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

ToArray

Returns an array containing all of the waypoints in the collection.

JavaScript

ToArray()

C#

dynamic ToArray()

C++

HRESULT ToArray(

       VARIANT* Waypoints)

Return Value

Waypoints

A Safe Array that contains triplets of doubles. Each triplet is composed of an x-coordinate, a height, and a y-coordinate.

Note: In JavaScript, use the VBArray object. E.g.,

var waypoints = route.Waypoints.ToArray()

var arr = new VBArray(waypoints).toArray();

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.