IRouteWaypoints
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 IRouteWaypoints represents the waypoints of a dynamic object, the IRouteWaypoint orientation properties (Yaw, Pitch, Roll) are ignored.
| 
 
  | 
 Properties  | 
 
  | 
| 
 
  | 
 Gets the number of waypoints in the route.  | 
|
| 
 
  | 
 Gets the current playing route waypoint. The last waypoint passed through is reported.  | 
|
| 
 
  | 
 Gets the IRouteWaypoint element in the specified zero-based index.  | 
|
| 
 
  | 
 Methods  | 
 
  | 
| 
 
  | 
 Adds a waypoint to the end of a route.  | 
|
| 
 
  | 
 Deletes a waypoint from the route.  | 
|
| 
 
  | 
 Converts an array of waypoints to a route.  | 
|
| 
 
  | 
 Retrieves waypoint data.  | 
|
| 
 
  | 
 Inserts a waypoint at a specified point in the route.  | 
|
| 
 
  | 
 Modifies a waypoint’s properties.  | 
|
| 
 
  | 
 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 IRouteWaypoint element in the specified zero-based index.
To access a specific element use the following syntax: IRouteWaypoints(index).
C# exposes this property as an indexer accessed using the following syntax: IRouteWaypoints[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( IRouteWaypoint pWaypoint)  | 
|
| 
 C++  | 
 
  | 
| 
 HRESULT AddWaypoint( IRouteWaypoint* pWaypoint)  | 
|
Parameters
pWaypoint
An IRouteWaypoint 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 IRouteWaypoint 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#  | 
 
  | 
| 
 IRouteWaypoint GetWaypoint( int Index)  | 
|
| 
 C++  | 
 
  | 
| 
 HRESULT GetWaypoint( long Index, IRouteWaypoint** pWaypoint)  | 
|
Parameters
Index
A zero-based index of the waypoint for which to retrieve data.
Return Value
pWaypoint
An IRouteWaypoint 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, IRouteWaypoint pWaypoint)  | 
|
| 
 C++  | 
 
  | 
| 
 HRESULT InsertWaypoint( long IndexInsertAfter, IRouteWaypoint* 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 IRouteWaypoint 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, IRouteWaypoint pWaypoint)  | 
|
| 
 C++  | 
 
  | 
| 
 HRESULT ModifyWaypoint( long Index, IRouteWaypoint* pWaypoint)  | 
|
Parameters
Index
The zero-based index of the waypoint that the client wants to modify.
pWaypoint
An IRouteWaypoint 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.