Expanded property
Returns or sets whether the top-level directions from a Route object or the driving collections from any Direction object with sub-directions are expanded in the Directions pane. Read/write GeoTriState.
GeoTriState | Value | Description |
---|---|---|
geoFalse |
0
|
Directions are collapsed. |
geoTriStateMixed |
-2
|
Some directions in the collection are collapsed and some are expanded. This value can only be returned, not set. |
geoTriStateToggle |
-3
|
Toggles the collapsed directions to expanded and the expanded directions to collapsed. This value can only be set, not returned. |
geoTrue |
-1
|
Directions are expanded. |
Applies to
Collections: Directions
Syntax
object.Expanded
Parameters
Part | Description |
---|---|
object | An expression that returns a Directions collection. |
Remarks
In the user interface, if a collapsed Directions collection includes border crossings, construction warnings, or refuel warnings, these warnings also appear in the top-level Directions collection. In the object model, border crossings, and refuel warnings always appear in both the top-level and child Directions collections. Construction warnings, on the other hand, only appear in the child Directions collection.
Example
Sub ExpandOneDirection()
Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objRoute As MapPoint.Route
'Set up the application
Set objMap = objApp.ActiveMap
Set objRoute = objMap.ActiveRoute
objApp.Visible = True
objApp.UserControl = True
'Add route stops and calculate the route
objRoute.Waypoints.Add objMap.FindResults("Seattle, WA").Item(1)
objRoute.Waypoints.Add objMap.FindResults("Redmond, WA").Item(1)
objRoute.Calculate
'Expand the ninth direction, which is another Directions collection
objRoute.Directions.Item(9).Directions.Expanded = geoTrue
End Sub
Note This sample code is specific for use in MapPoint North America; it is for illustration purposes only.