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

ShowImportWizard not showing progress

This is a discussion on ShowImportWizard not showing progress within the Development forums, part of the MapPoint Desktop Discussion category; Morning all I've written an add-in that imports quite large datasets from text files using the Datasets.ShowImportWizard. However, it's not ...

  1. #1
    loudcox is offline Misplaced White Belt
    Join Date
    Dec 2007
    Posts
    5

    ShowImportWizard not showing progress

    Morning all

    I've written an add-in that imports quite large datasets from text files using the Datasets.ShowImportWizard. However, it's not displaying the progress dialog that you get when using it through the interface.

    My code is simply:

    Code:
    dsNew = TheMap.DataSets.ShowImportWizard(, strFilename, , 0)
    Does anyone know why this is, and how I can fix it?

    Many thanks
    Mike

  2. #2
    loudcox is offline Misplaced White Belt
    Join Date
    Dec 2007
    Posts
    5

    Re: ShowImportWizard not showing progress

    Managed to solve this, after a fashion. Since the import progress dialog is not displayed, I thought that I might display an animated form to show that something was happening, and then run the import on a thread.

    This failed. However, a quick look at Multi-threading in an add-in? let me know that all calls to Mappoint must be on the originating thread.

    So, I ended up with the following.

    Code:
    Public Class DoProgress
        Private fb As frmBusy
        Public Sub DisplayImportForm()
          If fb Is Nothing Then fb = New frmBusy
          fb.ShowDialog()
          fb.Dispose()
        End Sub
      End Class
    frmBusy is just a borderless form with a PictureBox containing an animated GIF, and a timer to refresh the form every 500ms. Since we can't interrogate the creation of the new dataset, it appears there's no way to get progress, so this will suffice.

    Then, when loading the data, the code is simply:

    Code:
    Dim cProgress As New DoProgress
    Dim tProgress As New System.Threading.Thread(AddressOf cProgress.DisplayImportForm)
    tProgress.Start()
    dsNew = TheMap.DataSets.ImportData(strFilename, , MapPoint.GeoCountry.geoCountryUnitedKingdom, MapPoint.GeoDelimiter.geoDelimiterComma, 0)
    tProgress.Abort()
    This means that when importing large datasets, the user doesn't think that Mappoint is hanging.

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

    Re: ShowImportWizard not showing progress

    Hi,

    thanks for feedback. it sure helps others.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. I need to a map showing only my state with the nam....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 07-20-2012, 03:40 PM
  2. showing as webmap
    By stewart in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 08-16-2007, 11:30 AM
  3. Showimportwizard ..no select type of map
    By mmartin in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 05-18-2007, 06:18 AM
  4. Optimize Progress Bar
    By Metod in forum MapPoint Desktop Discussion
    Replies: 15
    Last Post: 11-16-2005, 01:13 PM
  5. Showing all MSA boundaries on USA map
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 05-18-2003, 04:51 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