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

Searching pushpin sets in C#

This is a discussion on Searching pushpin sets in C# within the MapPoint Desktop Discussion forums, part of the Map Forums category; I have read through many posts on this forum, and I can not figure out why this does not work. ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Searching pushpin sets in C#

    I have read through many posts on this forum, and I can not figure out why this does not work. I have three pushpin sets, and I want to search one particular set for a certain pushpin. I have declared all the datasets and recordsets variables but I can not figure out how to select which pushpin set I want to look through.

    MapPoint.Location loc;
    MapPoint.DataSets DSets = axMappointControl1.ActiveMap.DataSets;
    MapPoint.DataSet Dset = axMappointControl1.ActiveMap.DataSets(???)
    MapPoint.Recordset RSet = Dset .QueryAllRecords();


    That is the part of the code I am referring to, but I dont know what goes where the question marks are. I thought i could use .Item but it does not work. Im new to mappoint, so Im probably missing something obvious, but I cant figure it out. Any help would be appriciated.

  2. #2
    harpanet is offline Junior Member White Belt
    Join Date
    Jan 2005
    Posts
    3
    I use the following syntax to access MapPoint collections:
    Code:
    object index = "dataset name";
    DataSet  ds = m_Map.DataSets.get_Item(ref index);
    It's a bit odd, but it works.

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

    This access the dataset by number (it starts at 1 instead of 0):
    Code:
                object o = 1;
                MP.ActiveMap.DataSets.get_Item(ref o);
    This is by name:
    Code:
                object o = "My other pushpins";
                MP.ActiveMap.DataSets.get_Item(ref o);

  4. #4
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    I just wanted to thank you both for your help. Your suggestions worked great. I knew it had to be something simple that I wasn't seeing. You guys saved me hours and hours of trying to figure it out.

    Thank again.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Address Searching
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 01-07-2005, 09:07 AM
  2. Showing/hiding pushpin sets
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 11-23-2004, 04:33 PM
  3. pushpin sets pick random spot NOT correct address?????
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 08-15-2004, 01:53 AM
  4. Searching by Entity ID
    By the_jock in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-29-2004, 09:37 AM
  5. joining pushpin sets
    By tommigo in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-01-2003, 06:21 AM

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 88 89 90 91 92 93 94 95 96