MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Programmatically delete Imported Custom Symbols

This is a discussion on Programmatically delete Imported Custom Symbols within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I was wondering if anyone know how to programmatically delete imported custom symbols. TIA...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (2) Thread Tools Display Modes
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 02-06-2007
Junior Member
Yellow Belt
 
Join Date: Nov 2006
Posts: 20
Programmatically delete Imported Custom Symbols

I was wondering if anyone know how to programmatically delete imported custom symbols.
TIA
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 02-07-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: Programmatically delete Imported Custom Symbols

Hi Kevin,

I mostly do all from within programming, then you have all in control of course. I never tryed it, but if you import with the MapPoint user interface it is probably the same. You can give (I think) each pushpin an exclusive name. Then you can find the pushpin with FindPushpin(name) and eventually delete it.

Of course if you do the import from within your application you can keep a linked list to all imported data.
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 02-07-2007
Junior Member
Yellow Belt
 
Join Date: Nov 2006
Posts: 20
Re: Programmatically delete Imported Custom Symbols

I think this might work, but I still need to code it and test it.

Adding the Symbol into MapPoint is done like this:
Code:
axMappointControl.ActiveMap.Symbols.Add(filePath)
I'm thinking the Symbol can be deleted by the following:
Code:
MapPoint.Symbol symbol = axMappointControl.ActiveMap.Symbols.ItemByID(symbolID);
symbol.Delete();
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 02-08-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: Programmatically delete Imported Custom Symbols

Hi Kevin,

Yes this will work. Sorry I did completely misundersteand your original question.
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 02-08-2007
Junior Member
Yellow Belt
 
Join Date: Nov 2006
Posts: 20
Re: Programmatically delete Imported Custom Symbols

i improved the code so it doesn't take as long to delete the imported symbols.

pretty much we use a collection to help manage the imported symbols.

when we add the symbol:
Code:
MapPoint.Symbol symbol = axMappointControl.ActiveMap.Symbols.Add(fileName);
symbol.Name = fileName;
arrayList.Add(fileName);
when we add the symbol, symbol name does not contain the extension.
so we would have to set the symbol name to file name.

when we delete:
Code:
object objSymbol = fileName;
MapPoint.Symbol symbol = axMappointControl.ActiveMap.Symbols.get_Item(ref objSymbol);
symbol.Delete();
arrayList.Remove(fileName);
note: the reason why i'm using symbol name instead of symbol ID is because the user will be able to add and delete the imported symbol on their own. so the symbol ID may be referring to another symbol.

Last edited by Kevin_Williams; 02-08-2007 at 06:34 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 02-09-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: Programmatically delete Imported Custom Symbols

Hi Kevin,

Thanks for feedback. Yes it is always a good idea to keep yourself a collection / array / linked list. And normally it is faster 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
Reply

Tags
custom, delete, imported, programmatically, symbols


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/programmatically-delete-imported-custom-symbols-5654.html

Posted By For Type Date
Location Technology & Business Intelligence Executive Symposium - MP2K Magazine This thread Refback 02-14-2007 01:38 PM
The Magazine for MapPoint - MP2K Magazine This thread Refback 02-11-2007 08:39 PM

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
Creating Custom puspin symbols hegdek MapPoint 2006/2009 Discussion 1 11-30-2006 01:38 AM
Custom Maps imported to MapPoint TomZ MapPoint 2006/2009 Discussion 2 11-18-2005 04:44 PM
Custom Pushpins symbols mionut MapPoint 2006/2009 Discussion 1 11-18-2005 11:24 AM
Custom symbols Il Rex MapPoint 2006/2009 Discussion 1 07-19-2005 02:15 PM
Custom Symbols Anonymous MapPoint 2006/2009 Discussion 1 11-20-2003 01:21 PM


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


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