Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

How to choose Fast, Short or Preferred itineray

This is a discussion on How to choose Fast, Short or Preferred itineray within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, I didn't found how to choose Fast, Short or Preferred itineray programmaticly. This is a temporary solution for my ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    How to choose Fast, Short or Preferred itineray

    Hi,

    I didn't found how to choose Fast, Short or Preferred itineray programmaticly.

    This is a temporary solution for my previous question about avoinding
    "Boulevard peripherique" in my intenary calculations.

    I tried some tests directly in Mappoint and
    choosing the SHORT options in Route object preferencies,
    never the "BD Periphérique" is chosen. But when I choose FAST or
    PREFERRED Options the itineray calculation include "BD péréphérique".

    How to do that programmaticly ?


    Thanks in advance for your help

    Aurelia

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Preferred, Quickest and Shortest Segment in Itinerary

    To choose Fast, Short or Preferred itineray programmaticly,
    I found the solution reading Help.
    I was searching in Route objects, so I have to search in
    Waypoints object and Segment Preferences.

    Aurelia

    Code:
    geoSegmentPreferred  2 // Prendre les routes préférées
    geoSegmentQuickest   0 // Prendre l'itinéraire le plus rapide. 
    geoSegmentShortest   1 // Prendre l'itinéraire le plus court. 
    
    S'applique à
    Objets :  Waypoint
    
    Syntaxe
    objet.SegmentPreferences
    
    Paramètres
    Élément Description 
    objet Obligatoire. Expression qui renvoie un objet Waypoint. 
    
    Exemple
      Sub ChangeSegmentPreferences()
    
      Dim objApp As New MapPoint.Application
      Dim objMap As MapPoint.Map
      Dim objRoute As MapPoint.Route
    
      'Configure l'application
      Set objMap = objApp.ActiveMap
      Set objRoute = objMap.ActiveRoute
      objApp.Visible = True
      objApp.UserControl = True
    
      'Ajoute des étapes
      objRoute.Waypoints.Add objMap.FindResults("Seattle, WA").Item(1)
      objRoute.Waypoints.Add objMap.FindResults("Redmond, WA").Item(1)
    
      'Choisit les autoroutes comme routes préférées, puis établit l'itinéraire  sur base de ces préférences et calcule l'itinéraire
       
      objRoute.Waypoints.Item(1).SegmentPreferences = geoSegmentShortest
      objRoute.Calculate
    
      End Sub

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Letting MapPoint choose the waypoint sequence
    By BobFromBoston in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 10-21-2005, 08:43 PM
  2. Fast way to add radius?
    By nomad_33fw in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-10-2005, 08:55 AM
  3. Adjusting preferred arrival setting
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 14
    Last Post: 03-03-2005, 01:43 PM
  4. how to avoid a route in itineray
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 11-12-2004, 09:23 AM
  5. Is there a fast way of adding pushpins?
    By matt1168 in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 07-24-2003, 10:44 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66