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 3 of 3

MP '04 - Route Options

This is a discussion on MP '04 - Route Options within the MapPoint Desktop Discussion forums, part of the Map Forums category; Each time i open the form with the AxMappointControl1, all of the Options in the Route Planner are reset to ...

  1. #1
    johnweidauer is offline Junior Member White Belt
    Join Date
    Feb 2004
    Posts
    8

    Question MP '04 - Route Options

    Each time i open the form with the AxMappointControl1, all of the Options in the Route Planner are reset to the default. My idea is to store my settings in a DB and set them each time the AxMappointControl1 is used. Unfortunately, I am not sure how to do this, any thoughts?

    I would like to Control the Fuel costs mostly, but I had access to all the options it would make life easier.

    Thanks.

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    you cannot just let the control save them but it is very simple. Make a class with all the settings you want to keep persistent. Then stream it to an xml file or whatever you like to have it kept. I can make you an example in C# if you want.

  3. #3
    jakevo is offline Junior Member Yellow Belt
    Join Date
    Jan 2010
    Posts
    18

    Re: MP '04 - Route Options

    Quote Originally Posted by Wilfried View Post
    Hi,

    you cannot just let the control save them but it is very simple. Make a class with all the settings you want to keep persistent. Then stream it to an xml file or whatever you like to have it kept. I can make you an example in C# if you want.

    hi

    can u do exapmle for me for this compilation:
    Private Sub OBLICZ()
    Dim objApp As New MapPoint.Application
    Dim objMap As MapPoint.Map
    Dim objRoute As MapPoint.Route
    Dim objLoc1 As MapPoint.Location
    Dim objLoc2 As MapPoint.Location

    Set objApp = CreateObject("MapPoint.Application.EU.16")
    objApp.Visible = False

    Set objMap = objApp.NewMap
    Set objRoute = objMap.ActiveRoute
    Worksheets("Arkusz1").Cells(1, 3).Value = "ODLEGŁOŚĆ (kms)"
    Worksheets("Arkusz1").Cells(1, 4).Value = "Czas(mins)"
    Worksheets("Arkusz1").Cells(1, 5).Value = "Koszt(PLN)"
    NReadRow = 2

    Do While Worksheets("Arkusz1").Cells(NReadRow, 2) <> ""

    'Locate the 2 points
    Set objLoc1 = objMap.FindResults(Worksheets("Arkusz1").Cells(NRe adRow, 1)).Item(1)
    Set objLoc2 = objMap.FindResults(Worksheets("Arkusz1").Cells(NRe adRow, 2)).Item(1)

    'Calculate the route
    objRoute.Waypoints.Add objLoc1
    objRoute.Waypoints.Add objLoc2
    objRoute.Calculate

    'Drive Distance in kms
    Worksheets("Arkusz1").Cells(NReadRow, 3) = objRoute.Distance
    'Drive Time in minutes
    Worksheets("Arkusz1").Cells(NReadRow, 4) = objRoute.DrivingTime
    'Straight Line Distance in kms (as a check)
    Worksheets("Arkusz1").Cells(NReadRow, 5) = objRoute.Cost
    objRoute.Clear

    NReadRow = NReadRow + 1

    Loop

    End Sub

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Question on data map options
    By ibjohn in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-23-2006, 06:47 AM
  2. remembering print setup options
    By hinejs in forum MapPoint Desktop Discussion
    Replies: 10
    Last Post: 08-01-2006, 10:01 AM
  3. how to know wich print options to set
    By Wilfried in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 11-18-2005, 10:23 AM
  4. route options
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 12-30-2002, 01:29 PM
  5. Adding me own options to a menu.
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 09-17-2002, 05:43 PM

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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96