MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Clearing all pushpin

This is a discussion on Clearing all pushpin within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, how can i remove all pushpins from a map? regards.....


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-04-2005
Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 44
Clearing all pushpin

Hi,
how can i remove all pushpins from a map?

regards..
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 05-04-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Hi,

Code:
            MapPoint.DataSets ds = MP.ActiveMap.DataSets;
            object o = "My Pushpins";
            Recordset rs = MP.ActiveMap.DataSets.get_Item(ref o).QueryAllRecords();
            rs.MoveFirst();
            while (!rs.EOF) {
                rs.Pushpin.Delete();
                rs.MoveNext();
            }
This is another approach:

Code:
            object o = "My Pushpins";
            try {
                MapPoint.DataSet myPushpins = MP.ActiveMap.DataSets.get_Item(ref o);
                myPushpins.Delete();
            } catch {
                // Dataset does not exists
            }
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 05-05-2005
Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 44
Not works.. sorry...

it say..

The member on the request collection doesent exist.. use a valid name or an index

for each of your example i receive same error.

regards.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 05-05-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Hi,

Strange, I tryed both and both are working. Try following:

Code:
object o = 1;
Instead fo the "My Pushpins". I test it and it works also. The first database is the one with the pushpins. Unless of course you have explicitely stored somewhere else (by moving them to another).

I tested it with C# and Mappoint 2004 but should work with other versions also.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 05-06-2005
Junior Member
Yellow Belt
 
Join Date: Nov 2004
Posts: 13
You can try this:

Dim i as int
Do While oMap.DataSets.Count > 0
i = oMap.DataSets.Count
oMap.DataSets(i).Delete
Loop
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


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
How to Calculate 2 itineraries without clearing ActiveRoute Anonymous MapPoint 2006/2009 Discussion 2 12-13-2004 09:54 AM
clearing pushpins starbuck MapPoint 2006/2009 Discussion 2 10-19-2003 03:32 PM
Finding Pushpin Name by clicking on the Pushpin?(MP 2002) NickSP MapPoint 2006/2009 Discussion 4 01-10-2003 12:11 PM
Clearing the Anonymous MP2K Magazine Articles 0 07-12-2001 11:48 PM


All times are GMT -5. The time now is 11:19 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

Flights Lanzarote
Volcanic landscapes to explore and warm white sandy beaches to relax on. For flights to Lanzarote search Holiday Hypermarket.

City Break Holidays
Book city break holidays through Travel Counsellors. A personal travel advisor will help with your city break holiday plans.

Jamaica Holidays
Jamaica Holidays can include world class business hotels, upscale shopping and top entertainment and dining. Alternatively, hit the beach or hike in the hills. Book online with us.

Egypt Holidays
Visit one of the most spectacular sightseeing destinations in the world with The Holiday Place. Egypt holidays provide a fantastic break!

Holiday
Searching for the perfect holiday? Well check out ULookUBook online to find out all about your destination and also to book a great value holiday.

Travel In
Travel.co.uk is the one you are looking for when checking out price comparison sites, so that you can travel in the way you choose.

Cheap Portugal Holidays
Hotels of all ratings! Find information on cheap Portugal holidays at On The Beach!


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