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

Dataset Copy/Paste

This is a discussion on Dataset Copy/Paste within the MapPoint Desktop Discussion forums, part of the Map Forums category; What is the purpose of the Copy/Cut/Paste methods of the dataset object? I assumed that it was there so you ...

  1. #1
    indmillert is offline Junior Member White Belt
    Join Date
    Sep 2003
    Posts
    6

    Dataset Copy/Paste

    What is the purpose of the Copy/Cut/Paste methods of the dataset object? I assumed that it was there so you could copy/cut/paste a dataset of pushpins. In theory, if this were true, you could have two instances of the MP control and copy/paste full pin datasets between the two instances. This would allow you to build a pseudo-layering technique and/or do double-buffering of the map drawings.

    DisplayMap.ActiveMap.DataSets.Item("My Stuff").Copy()
    LayersMap.ActiveMap.DataSets.AddPushpinSet("My Stuff").Paste()

    The code above actually compiles and runs with no issue. And if you display the Dataset.Count property of the second control (LayersMap) it now contains an additional dataset named "My Stuff". This problem it seems is that I have not been able to get the secondary map to actually show the pushpins on the map.

    Why not? This seems like it *should* work. I even tried adding a pushpin to that set and then deleting it to force the map to refresh. No dice.

    Any thoughts?? This would really be cool if this idea could actually be made to work. Opens up a lot of possibilities.

    Toby Miller

  2. #2
    indmillert is offline Junior Member White Belt
    Join Date
    Sep 2003
    Posts
    6
    I am referring to MP2004 btw...

  3. #3
    indmillert is offline Junior Member White Belt
    Join Date
    Sep 2003
    Posts
    6
    Well after researching further, the Dataset.Copy and Dataset.Paste commands only deal with the dataset definition itself and not the underlying pushpins (recordset). If you display Dataset.RecordCount() after the paste it is 0. What useful purpose does this serve?

    Does anyone see any magical way to make this work?

  4. #4
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    This will do what you are wanting it to do.
    Rather than:
    DisplayMap.ActiveMap.DataSets.Item("My Stuff").Copy()
    LayersMap.ActiveMap.DataSets.AddPushpinSet("My Stuff").Paste()
    Try:
    DisplayMap.ActiveMap.DataSets.Item("My Stuff").Copy()
    LayersMap.ActiveMap.Paste()

    I have gotten this to achieve the desired "layering" effect.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. DataSet.Paste: Exception from HRESULT: 0x80040E04 (vb.NET)
    By thomas in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 01-18-2009, 01:52 AM
  2. Would like to buy a used copy of MP2002 or S&T2002.
    By Jimsim in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 04-08-2005, 10:28 AM
  3. Cut and Paste Problem with Word 2003 and MapPoint 2004
    By brubli in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 10-21-2004, 05:26 PM
  4. Problems with copy and paste of user-defined territories
    By Ute in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 04-14-2003, 12:38 PM
  5. Hi there - I am trying to copy several maps into P....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-01-2002, 04:42 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