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

showdatamappingwizard

This is a discussion on showdatamappingwizard within the MapPoint Desktop Discussion forums, part of the Map Forums category; I am trying to use the showdatamappingwizard function on the datasets object, but I am running into a slight problem. ...

  1. #1
    Eamon is offline Junior Member Yellow Belt
    Join Date
    Aug 2002
    Posts
    15

    showdatamappingwizard

    I am trying to use the showdatamappingwizard function on the datasets object, but I am running into a slight problem. I run my program and I try to specify the startpage parameter, but MapPoint ignores it and just displays the default window. Also I am specifying a dataset and it is not nothing. The dataset also exists in the datasets collection that I am calling this function on. Here is my code

    m_objmap is a object of mappoint.map type

    Public Sub addDemographics(ds As DataSet)
    m_objmap.Parent.Visible = True
    m_objmap.DataSets.ShowDataMappingWizard , ds, geoDataFieldsPage
    End Sub

  2. #2
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    Eamon,

    This is the only thing I could find that might explain the problem: The geoDataFieldsPage is Valid as a start page only for an existing data map. Not valid for Pushpin maps.

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Thanks for the help.I read that part in the help too. I tried to create a small program that show this behavior except with a pushpin and geoPushpinSetPage. I Just created a from with two buttons, and I have an access database with a table of locations in table customers. I just want to know if any one can replicate this behavior.Sorry about the tabs. This doesn't seem to want to keep formatting when I post code.

    Option Explicit
    Private m_app As New MapPoint.Application
    Private m_map As MapPoint.Map

    Private Sub cmdImport_Click()
    Const strCnn As String = "E:\customers_sample.mdb!CUSTOMERS"
    m_map.DataSets.ImportData (strCnn)
    End Sub

    Private Sub cmdWizard_Click()
    Dim ds As DataSet
    Set ds = m_map.DataSets(1)

    m_map.SaveAs "C:\test.ptm"
    m_map.DataSets.ShowDataMappingWizard , ds, geoPushpinSetPage
    End Sub

    Private Sub Form_Load()
    Set m_map = m_app.NewMap
    m_app.Visible = True
    End Sub

    Private Sub Form_Unload(Cancel As Integer)
    m_app.ActiveMap.Saved = True
    m_app.Quit
    End Sub

  4. #4
    Eamon is offline Junior Member Yellow Belt
    Join Date
    Aug 2002
    Posts
    15
    oops that was me.I forgot to login :D

  5. #5
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    Eamon,

    Replace your Sub cmdWizard_Click() with this and give it a try.

    Private Sub cmdWizard_Click()
    Dim ds As DataSet
    Set ds = m_map.DataSets(1)
    Dim objDataMap As MapPoint.DataMap

    m_map.SaveAs "C:\test.ptm"

    Set objDataMap = ds.DisplayDataMap(geoDataMapTypeDefault, , geoShowByRegion1, geoCombineByDefault, _
    geoRangeTypeDefault, geoRangeOrderDefault, 15)

    objDataMap.LegendTitle = "Test"

    m_map.DataSets.ShowDataMappingWizard , ds, geoDataFieldsPage

    End Sub

  6. #6
    Eamon is offline Junior Member Yellow Belt
    Join Date
    Aug 2002
    Posts
    15
    ahh much better many thanks ;)

    So what we learned here today is that you can't call datamappingwizard with the startpage parameter unless the dataset has a datamap object. Hooray for Forums!

Thread Information

Users Browsing this Thread

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

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