PDA

View Full Version : Need to Use 2006 Symbols in 2010 Using VBA



BookemDano
09-16-2013, 01:38 PM
Hello - I would like to use the symbols from MP 2006 in my MP 2010 maps. I have written a VBA program which imports several layers and assigns the standard 2010 symbols. However, I prefer the 2006 symbols and would like to use them instead. I have already copied all of the bmp files used in 2006 to a separate directory, but how do I tell MapPoint in VBA to use those symbols instead?

One last question, if someone is able to help me do this, and I share the map file with someone else, will they see the same symbols or would they have to have the symbols copied to their computer with the same path as mine. In other words, are the symbols saved in the MapPoint file itself?

Thanks!

Eric Frost
09-16-2013, 02:15 PM
Hi and welcome to the forums!

First, yes they are saved in the PTM file.

(You can also replace the default template with a map with the symbols already embedded so they are always available).

Where did you get the bmp files from the 2006 version? I think there was a download... is it this?

Download Pushpin images for Streets and Trips or MapPoint 2009 from Official Microsoft Download Center (http://www.microsoft.com/en-us/download/details.aspx?id=15876)
Download Pushpin images from Official Microsoft Download Center (http://www.microsoft.com/en-us/download/confirmation.aspx?id=15876)

To import them, you can do it one by one, or use a third-party script to do it.

There's a simple Excel VBA program which imports all the bmp symbols in a directory included with the Pushpin data set on PushpinCity.com - Welcome to Pushpin City! ? Provider of MapPoint Pushpin Symbol Sets and Tools for Creating and Managing Custom Pushpin Symbols (http://www.pushpincity.com/) ($19.95).

To switch to using the new symbols, how you write the program to switch to the new symbols depends on your map. If the symbols are individually set on each Pushpin, you can loop over them and make the change. If they are set on the dataset level, you can loop over the datasets. You'll need to figure out what corresponds to what, either by name or ID. I could help you with this.

Hope this at least gets you pointed in the right direction!

Eric

BookemDano
09-18-2013, 11:16 AM
Thanks Eric and thanks for the quick response!

Honestly, I didn't download the MP06 symbols. A co-worker of mine did. If you want to know how he did it, I can find out.

That's great news about the imported symbols being saved in the PTM. As a test, I imported one of the symbols I wanted to use and then saved the MP template. My assumption was that (and I thought I read this somewhere) the imported symbol would have the ID number equal to the last standard symbol in MP10 (in my copy it is the "green shopping sign") which is symbol #347 + 1. So, in my code, I use objDataSet.Symbol = 348. This didn't seem to work. Instead of the small yellow box that I was trying to get, I got something that looks like a king's crown. Do you know what I did wrong?

Thanks again for all of your help!

Eric Frost
09-18-2013, 12:46 PM
If you have more than 256 "MapPoint 2006" symbols, I definitely want to know where your co-worker got them and please send us a copy. See related thread here :-)

http://www.mapforums.com/2006-mappoint-symbols-297-301-help-28382.html

To answer your questions, I'd have to play with it, but I think they might start at 0 so maybe if you used objDataSet.Symbol = 347 it would work?


Can you run a quick loop to enumerate all the symbol names and their ID's? This should help you see what's going on. Something like this:



Sub ListSymbols(MAP As MapPoint.Map)
Dim sym As MapPoint.Symbols
For Each sym in MAP.Symbols
Debug.Print sym.ID, sym.Name
Next
End Sub

Eric Frost
09-20-2013, 11:34 AM
I found the rest of the 336 MapPoint 2006 symbols and posted them in an article I'm working on here --

http://www.mapforums.com/revisiting-microsoft-mappoint-2006-pushpin-symbols-28418.html

The article demos a script mass-converting all the 2013 symbols to the 2006 equivalents.

Eric Frost
09-23-2013, 10:58 AM
My assumption was that (and I thought I read this somewhere) the imported symbol would have the ID number equal to the last standard symbol in MP10 (in my copy it is the "green shopping sign") which is symbol #347 + 1. So, in my code, I use objDataSet.Symbol = 348. This didn't seem to work. Instead of the small yellow box that I was trying to get, I got something that looks like a king's crown. Do you know what I did wrong?

When I ran that EnumerateSymbols it looks like that for whatever reason the custom symbol ID's start at around 400. Maybe they just wanted to reserve that space for additional built-in symbols in future versions.