Community of VE/MapPoint Users and Developers
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...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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) Code: MapPoint.Symbol symbol = axMappointControl.ActiveMap.Symbols.ItemByID(symbolID); symbol.Delete(); |
| |||
| Re: Programmatically delete Imported Custom Symbols
Hi Kevin, Yes this will work. Sorry I did completely misundersteand your original question.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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); 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); Last edited by Kevin_Williams; 02-08-2007 at 06:34 PM. |
| |||
| 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.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| custom, delete, imported, programmatically, symbols |
| ||||
| 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 | |
| |
| ||||
| 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 |