MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




ShowImportWizard not showing progress

This is a discussion on ShowImportWizard not showing progress within the Development forums, part of the MapPoint 2006/2009 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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion > Development

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 12-12-2007
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 12-13-2007
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 12-14-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,094
Re: ShowImportWizard not showing progress

Hi,

thanks for feedback. it sure helps others.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
progress, showimportwizard, showing


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/showimportwizard-not-showing-progress-6879.html

Posted By For Type Date
The Magazine for MapPoint - MP2K Magazine This thread Refback 12-12-2007 09:53 AM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
showing as webmap stewart MapPoint 2006/2009 Discussion 7 08-16-2007 11:30 AM
Showimportwizard ..no select type of map mmartin MapPoint 2006/2009 Discussion 2 05-18-2007 06:18 AM
Optimize Progress Bar Metod MapPoint 2006/2009 Discussion 15 11-16-2005 01:13 PM
Showing all MSA boundaries on USA map Anonymous MapPoint 2006/2009 Discussion 0 05-18-2003 04:51 PM
I need to a map showing only my state with the nam.... Anonymous MapPoint 2006/2009 Discussion 1 08-04-2002 01:09 PM


All times are GMT -5. The time now is 12:42 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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