WptsInRoute Property
Returns the IDs (names) of the waypoints in the current route.
Syntax
Visual Basic
object.WptsInRoute
Visual C++
object.GetWptsInRoute()
| Part
| Description |
| object |
An object expression that evaluates to a GPS ToolKit object. |
Example
Visual Basic
Dim wptArray
'Get IDs of waypoints in current route
wptArray = myGPSToolKit.WptsInRoute
Visual C++
long arrayUBound;
VARIANT variantData;
_variant_t vtWptID, vtWptArray;
CString strWptID;
// Get IDs of waypoints in route
vtWptArray = m_myGPSToolKit.GetWptsInRoute();
SAFEARRAY *psa = vtWptArray.parray;
// Get upper bound of array
SafeArrayGetUBound(psa, 1, &arrayUBound);
// Iterate through array
for(long i = 0; i <= arrayUBound; i++)
{
SafeArrayGetElement(psa, &i, &variantData);
vtWptID = variantData;
strWptID = (LPCSTR)(_bstr_t)vtWptID;
}
Remarks
None
Default
Empty (VT_EMPTY)
Returns
A VARIANT array (type VT_ARRAY/SAFEARRAY/VB Array) containing elements of VARIANTs
(type VT_BSTR/BSTR/VB String) which holds the ID (name) of the waypoint. If there are no waypoints in the route, or no route is active, this variable will be empty (type VT_EMPTY).
Errors
None
See Also
GetWptLocation method, DestWptID property, OriginWptID property, NavUpdate event
|