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

Adjusting data without needing to reimport file

This is a discussion on Adjusting data without needing to reimport file within the MapPoint Desktop Discussion forums, part of the Map Forums category; If I have a data file, and after importing it I notice that I need to change a value in ...

  1. #1
    abartel is offline Junior Member Yellow Belt
    Join Date
    Jul 2013
    Posts
    12

    Adjusting data without needing to reimport file

    If I have a data file, and after importing it I notice that I need to change a value in a specific field, is there any way to make this change without having to reimport the entire file? Since I have maps with 100 or so pushpins, I'd rather make the change in Mappoint than have to reimport the file and have Mappoint re-map each location.

  2. #2
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60

    Re: Adjusting data without needing to reimport file

    Alas no (and the same applies for the API) - data imported with the Data Import Wizard is read-only.

    You can only manually and arbitrarily update pushpins which have been been added "by hand" (one at a time, typically by clicking on the map or entering an address).
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

  3. #3
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: Adjusting data without needing to reimport file

    BTW, I think the only "field" you can edit is the .Notes property, which can be useful when manipulating datasets programmatically.

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  4. #4
    dudel is offline Junior Member Yellow Belt
    Join Date
    Jul 2010
    Location
    North Georgia Mountains
    Posts
    21

    Re: Adjusting data without needing to reimport file

    Well, I'm not certain about the import, but I needed to be able to change a pushpin from one symbol to another. I was able to make a quick pass through the recordset updating the pin symbols. It was pretty quick; but the map refreshed in batches.

    My code looks like this.

    foreach (MapPoint.DataSet mds in MPC.ActiveMap.DataSets)
    {
    if (mds.Name == "My pushpins")
    {
    if (mds.RecordCount > 0)
    {
    MPC.ActiveMap.Application.MousePointer = MapPoint.
    GeoPointer.geoPointerHourglass; // show busy
    MapPoint.Recordset mrs = mds.QueryAllRecords();
    do
    {
    if (mrs.Pushpin.Symbol == clsGM.fromPin) mrs.Pushpin.Symbol = clsGM.toPin;
    mrs.MoveNext();
    }
    while (!mrs.EOF);
    MPC.ActiveMap.Application.MousePointer = MapPoint.
    GeoPointer.geoPointerDefault; // all done
    }
    }
    }



    Hope it helps.

    Don

  5. #5
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: Adjusting data without needing to reimport file

    Ah very good yes.

    So on the Pushpin object, besides the .Note property which can be edited, you can also edit the Pushpin symbol.

    I didn't realize, but the Help file says that the Name Property of the Pushpin object is also read/write.

    And then of course you can also set and read the state of the BalloonState and Highlight Properties.

    The Location property can also be modified.

    So, if you're clever about it, there's actually quite a few places to store and retrieve bits of information on a pushpin.

    However, if you're talking about editing data values in the balloon for a dataset, this cannot be done and would require a re-import.

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  6. #6
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60

    Re: Adjusting data without needing to reimport file

    Yes the data fields are readonly. In my original reply it looks like I was assuming we were talking about datasets imported with the import or link wizards.
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

  7. #7
    dudel is offline Junior Member Yellow Belt
    Join Date
    Jul 2010
    Location
    North Georgia Mountains
    Posts
    21

    Re: Adjusting data without needing to reimport file

    Quote Originally Posted by Eric Frost View Post
    Ah very good yes.

    So on the Pushpin object, besides the .Note property which can be edited, you can also edit the Pushpin symbol.

    I didn't realize, but the Help file says that the Name Property of the Pushpin object is also read/write.

    And then of course you can also set and read the state of the BalloonState and Highlight Properties.

    The Location property can also be modified.

    So, if you're clever about it, there's actually quite a few places to store and retrieve bits of information on a pushpin.

    However, if you're talking about editing data values in the balloon for a dataset, this cannot be done and would require a re-import.

    Eric
    This came about when I was looking for a way to quickly serialize/deserialize loaded maps. Some of my maps have 40,000 points, and take a while to populate. That led to the need to be able to cache them and bring them back. Unfortunately, if they were saved with say, black pushpins, they would conflict with another map that also had black pushpins. Thus the code to change the pushpin symbols.

    The notes can indeed be updated. In my case, I'll reload a cached map and update the notes on the pushpins from a different database. When the map get's cached, the notes are saved. Reloading the cache takes seconds compared to hours when loading individual pins (and thats using lat/long; not findbyaddress!).

    Thanks,

    Don

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. New member needing training
    By jmbu2000 in forum Introduce Yourself
    Replies: 1
    Last Post: 11-13-2011, 07:15 AM
  2. New member needing training
    By cherishedmemories in forum Introduce Yourself
    Replies: 1
    Last Post: 10-28-2011, 03:05 AM
  3. Problem opening data file
    By JZgolf in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 01-06-2010, 10:12 AM
  4. Example Custom Data Source File
    By trevorjdaniel in forum Bing Maps and MapPoint Web Service
    Replies: 4
    Last Post: 12-21-2009, 11:43 AM
  5. filter data file
    By cambridgeways in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 02-08-2006, 06:57 AM

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