Jump to content

Display Caches On Map: Pushpins.exe


Recommended Posts

New Version Ready for Download:

PUSHPINS is a free program that automates the creation of pushpin maps in the inexpensive mapping program Microsoft Streets & Trips. To read about how this can be done automatically (via PUSHPINS.EXE) or manually, visit "Create Custom Pushpin Maps in Microsoft Streets & Trips" at http://www.craiggiven.com/gc_auto.htm

 

msst.gif

 

New in Version 1.03:

  • Add INI file support to allow parameters to be passed by a configuration file. Command line parameters can also be used simultaneously and they take precedence over duplicate settings in the INI file. This program will now prompt the user for any pieces that do not have a default value and are not supplied by either method.
  • Time delay for loading and changing of entire data sets is now calculated instead of being a hard coded delay. Small data sets will not be unnecessarily cause delays and larger datasets will have enough time to process. Eventually the delay factor will be parameterized so that users with slower machines can adjust this to their particular environment.
  • Add third parameter to control file that controls balloon fields. Each character in the third field is either Y or N and determines if a balloon field should be shown. If the third parameter is missing then no balloon field processing will take place. The parameter must have the exact same number of characters as the balloon fields available. Currently 8 being sent by GSAK/GPSBabel, so the most common parameter will be YYYNYYYY since this turns off the URL (it isn't helpful information for most people, it takes up valuable balloon space -- which can force some information out-of-bounds [not visible], and Ctrl-click will still open the cache page whether it is displayed or not. NOTE: this program assumes that the FIRST TWO fields [latitude and longitude] are ALREADY turned on! This works fine for GSAK 5.5.1 and MSST 2005 but different versions may work differently. If this should occur to you, use the opposite values than expected to get the desired results.
  • GSAK example macro PUSHPINS.TXT should have included the WAIT=YES parameter when shelling to DOS
  • GSAK example macro PUSHPINS.TXT now includes balloon field controls that turn off URL display.
  • GSAK example macro PUSHPINS.TXT was missing an entry for TerraCaches. Also renamed the 3 occurences of the vauge TC abbreviation so now the data set displays the much clearer "TerraCaches" in MSST.

Link to comment

This looks like a great little automation tool and I can't wait to make it work. I tried to follow your tutorial exactly but here's what happened........

 

When I run the pushpin macro from within GSAK, it stops at the Mystery cache and gives an error report saying "gpsbabel.exe has encountered a problem and needs to close. We are sorry for the inconvenience." I select "Don't Send" (to Microsoft) and the batch file continues on for all rest of the cache types. When it is done, I look on MSST and nothing shows up - it still looks like a blank map. I made sure it was a blank, fresh map.

 

I must be doing something wrong - or that error message is the culprit?

 

I set up all the folders just like the tutorial

 

EDIT: Never mind I found the problem. I had run the pushpin filter macro thinking that's what was going to produce the legend of pushpins in MSST. :huh:

I just ran the pushpin batch file and it delivered as advertised! Love it, thanks Xangxa!

 

2nd EDIT: The error reported above still caused a problem with the mystery caches. The resulting legend of pushpins was missing these mystery caches and had assigned the mystery cache icon to the next cache type in the batch file (Multi). Has anyone else had this same error report?

Edited by popop
Link to comment

The automation tool can't do anything unless GSAK creates the data. So you'll need to start by fixing GSAK. Here are some things to try: 1. Under the database menu select Repair/Defrag in case a corrupt database is the culprit. 2. Backup your database de-install and then re-install GSAK 3. Make sure you're using the current version of GSAK. 4. Make sure you're using the right version of the macros with the right version of GSAK. I.e., macros downloaded after 4/29 are designed to work with GSAK 5.5.x And lastly, you may need more experienced assistance from GSAK experts. Although Clyde is on vacation till the end of May, you can still ask questions in THIS THREAD

 

You can also examine the results of the macro to see how far it got. Look for the PushPinList.txt file and open in NotePad to see what it contains. The PushPinList.txt will list the different data files, so check that they exist. Make sure all these files are being written to a drive location with enough room and access rights (just being thorough).

 

If some of the files got created before GSAK died, try manually importing the data files and assigning the custom icons. I.e., Use NotePad and copy and paste from PushPinList.txt into the File Open Dialogs of MSST to validate all path and file names.

Link to comment
Here are some things to try: 1. Under the database menu select Repair/Defrag in case a corrupt database is the culprit...

Thanks for the ideas, Xangxa - didn't need to go past idea #1. Ran the Repair tool and repeated the automation process again with success. No issues with the mystery caches!

 

One thing I'm not understanding is how the Terracaches need to be set up. At this point I have them in a separate database (only three for now - that's all Oregon has right now). Your tutorial said something about "via user data". I'm not sure I know what actually needs to go in the user data field in GSAK. I assume I'll need to add the three Terracaches (not found yet) to my main database. For now, I've just removed the program lines in the filter macro for Terracaches so it doesn't even look for them - otherwise it gives an error and the macro aborts. I saved those statements into another file so I can just add them back in when I know to do in the user data field.

Link to comment
One thing I'm not understanding is how the Terracaches need to be set up....

There's more than one way to skin that cat, but I'll share how I've done it. Clyde is also considering some updates to GSAK that will make this easier to track (e.g., GPX source).

 

I have 2 databases (well, actually more than that, but for this discussion only 2 apply). I also have a TC database that only contains TerraCaches. But since I want my maps to show both GC and TC caches, I also load TerraCaches into my "Default" database. Here is how I identify which are TerraCaches.

 

1. Sort by code by clicking the CODE column of your grid view. This will put all the TerraCaches together.

2. Make sure USER DATA is displayed in your grid view (\View \Add/Delete Columns).

3. For each TerraCache, put in the letters "TC" (at the beginning if you already have data in these fields). I also have some "offset" coordinates so I'll put "TC ACTUAL" in those records.

4. Create a filter called "TerraCaches" and use this criteria for USER DATA: RegEx ^TC

(I.e., use a regular expression that specifies records where TC is at the beginning of the USER DATA field)

5. I also change the AVAILABLE STATUS to exclude all but "Available" but that's not necessary for identifying TerraCaches specifically.

6. After you save the filter, test it to make sure it shows all the records you expected.

 

Now with the filter built, the PushPin macro should contain these lines (drive, path, file names, and settings can be altered for your setup):

 

CANCELFILTER
FILTER name="TerraCaches"
IF $_FILTERCOUNT > 0
EXPORT TYPE=SNT SETTINGS=PushPins FILE=C:\GPS\PushPins\TerraCaches.csv
RUNPGM pgm="C:\GPS\PushPins\PushPinListBuild.bat" parms=TerraCaches,YYYNYYYY,C:\GPS\PushPins\PushPinList.txt WAIT=YES
ENDIF

Link to comment
... The glitch I am experiencing is the "Description" portion of the balloon is only showing the Difficulty and Terrain (which is repeated in the Diif & Terr section of the balloon) and no other text. ...

 

I think I have a solution. I think this is controlled by the SETTINGS= parameter for each export. Try the following and see if it fixes the problem.

  1. Start GSAK and go to /File /Export /Microsoft Streets and Trips CSV file...
  2. About half-way down the dialog is a field called "Cache Description Format"
  3. Change the contents of this field to the format you desire. I'm using "%con1 %code %Name by %By (%Dif/%Ter) %datepl" (to choose/understand these special tags click the HELP button, click the "Cache Description Format" field in the help window that's displayed, and then click the "Special Tags" link. Although not related to your problem, I also changed the "Waypoint Name" field to "%drop2_%typ1%con1_%dif1a/%ter1a %notGC %code"
  4. After you've filled out the dialog how you like it, click the SAVE button and give it a short easy name (I named my settings "PushPins")
  5. Edit the export macro so that it uses the settings you just created (e.g., I edited my PushPin.txt file and ensured SETTINGS=PushPins for every EXPORT command)

Optionally, you might want to play around with settings until they're just right.

Before testing, set a filter so that the tests files are small and fast.

  1. Manually export, using your settings, out of GSKA to MSST format
  2. Manually import into a blank MSST map
  3. SHOW INFORMATION for a pushpin
  4. If necessary, change settings, save settings, and repeat test

Link to comment

VERSION 1.04: AutoRoute (European) Flavor

 

The European version of MSST is named AutoRoute. Therefore a new parameter has been added to PushPins called FLAVOR. You can use the command line or the INI file to set FLAVOR="AutoRoute" so that PushPins will work with the European flavor of the product.

 

If you do not specify a flavor, then "Streets & Trips" is the default.

 

If you use the FLAVOR= parameter you must be very precise. The name must be what appears in the upper left of the program's window. You should only specify the core name of the window -- just enough so that it's uniquely identifiable. E.g., the default window name for MSST is: "Map - Microsoft Streets & Trips"

 

So all you'd really need is the piece "Streets & Trips" as the window name. BUT, the portion that you do specify must match exactly! Spelling, spacing, punctuation, and upper/lower case are all critical! "Streets and Trips" would be WRONG, since it is "&" not "and" that appears in the program's title. If the program name contains spaces, we must enclose the name in double quotes. Useable examples for both program flavors appear below:

 

FLAVOR="Streets & Trips"

or

FLAVOR="AutoRoute"

Link to comment

This seems like a great tool for geocaching or any type of trip plotting!

 

Only suggestion, have it read the GPX file directly without having the need for several other programs in between the data creation process.

 

Pocket Queries: http://www.geocaching.com

ZIP utility: http://www.winzip.com

EZDetach: http://www.techhit.com/ezdetach/

GSAK: http://gsak.net/

GPXsonar: http://gpxsonar.homeip.net/default.aspx

MightySync: http://mydocsunlimited.com/

--------------------------------------------------------------------------------

 

GPSbabel: http://gpsbabel.sourceforge.net/

While GPSbable doesn't figure anywhere into the workflow documented herein, it's a notable and useful tool on occasion, and no list would be complete without it.

WinBatch: http://www.WinBatch.com

Answers "How did he do that?" You do NOT need this program! I'm listing it here because it is the product I've used to create at least one of the automation pieces, which is available for free on this site. You do not need WinBatch to use these pieces. You would only get WinBatch if you were interested in building your own programs for other projects and you have the necessary technical inclination.

 

If it could parse the GPX files directly and get the data directly from the GPX file, I am sure it would make the process much quicker and people wouldn't need to have anything except your program and the GPX files.

 

Similar to my "GPX to Google Maps" program:

http://www.twistedpairrecords.com/map/GPX/gpxblog.html

 

My program will read in the LOC and GPX files just by simply dragging and dropping them on a hotspot in the form. It then does the rest for you based on the options you choose, either for a routed PolyLine map or a Cache map, or the new universal GPX maps, where you can create a map from data used by your GPS once exported to your desktop as a GPX file.

 

Great job on this tool though! Anyone creating these sorts of programs knows how much time and work it takes in order to get the finished product! I know from experience, it's hard work but also rewarding to actually see people using your creations.

Link to comment

PushPins actually doesn't require any of those programs. That list was for my workflow as a whole. Pushpins is just one of the many tools, and I was overviewing all the tools in the toolbox, and how they fit together into an automated geocaching workflow.

 

I can see the benefits of the XML parsing. I took the export approach because I wanted to use the powerful filtering features of GSAK. And using the multi-database architecture allows me to layer PushPins with polygon, arc, and point filtering.

Edited by Xangxa
Link to comment

QUESTION: I own both AutoRoute and Streets & Trips. How do I get PushPins to work with both programs?

 

The best approach is probably to have two shortcuts to PUSHPINS.EXE. Name the first something like "MSST PushPins." Name the second shortcut "AutoRoute PushPins." For the "AutoRoute PushPins" shortcut, add the desired command line parameters. For example, in the shortcut properties, in the Target field, after PUSHPINS.EXE add a space and then add FLAVOR=AutoRoute).

 

Here is the order of precedence for settings

  1. Settings receive their values from the INI file if it exists (it looks for PUSPINS.INI in the same directory as PUSHPINS.EXE).
  2. If the INI doesn't exist, or if the INI doesn't set an item, it receives a default value (defined internally by PUSHPINS.EXE).
  3. Command line parameters are examined, and they override any settings from the INI file or from internal defaults
  4. If the LIST setting hasn't been defined, then the user is prompted to select the file containing the data list.

Link to comment

You can find it on my website in the geocaching section.

 

On that page's menu click the link named "Tools and Articles." At the next menu, under the "Utilities" header click the "Automating Geocaching" link. In the Table of Contents menu at the top of that page, click the link entitled "Create Custom Pushpin Maps in Microsoft Streets & Trips."

 

You will now be on the page that describes the setup and procedures for using the PUSHPINS.EXE program. The actual download is about midway down, under the heading "Stage MSST Import Batch Files and Programs." It is part of the ZIP file named MSSTBATCH.ZIP and there is an icon and a text link that you click to download that portion of the program. There are also two other files that most people download as well, and both have links on the same page: MSSTICONS.XIP and PUSHPINS.TXT

Link to comment

I have followd the instructions from your page. But i have a problem with Pushpins.exe. It expects a csv file from GSAK wit a comma-sepperator. But i have the csv's with a Tab-sepperator. I dont know why, but i think that it is not possible to change. Is there a easyway to get the code from your pushpins.exe so that i can change it working for me.

I think you have done a great thing. It looks like a miracle to me when i see it working.

Edited by Jurgen & co
Link to comment

The Zip file on the website is the latest version.

 

PUSHPINS actually doesn't care what's in the data files spit out by GSAK/GPSbabel. It will happily load a binary file with any extension if you purposely fake it out. The program that cares what's being received is MSST. So check the data files to confirm that it's in a format acceptable to MSST. You can open them in a text editor or MS Excel to verify their contents. You can also manually import one of the GSAK exports to see if MSST is happy with it.

 

As far as MSST is concerned, a .csv file can be either comma or tab delimited and MSST will automatically sense how each is delmited and default to the correct separator. In fact, my setup includes a mixture of both: The dynamically generated files from GSAK are tab delimited, and the static hand-built files are comma delimited.

Link to comment

How are you setting the FLAVOR parameter? AutoRoute requires a slightly different setup than MSST.

 

Also, obeserve the keystrokes sent by PUSHPIN. If another program pops to the foreground, or something slows the PC down enough, then a keystroke could be lost. Then the process is unsynchronized and all bets are off.

 

If that happens, then make sure nothing else is running that might pop up (email notifications, update notices, etc.). If the PC is too slow to keep up with PUSHPINS keystrokes, change the delays in the INI file. Some days my PC gets grumpy and I've set the delays higher to make it happy. And then it still might take a couple of tries to get MSST off on the right foot. Here are my INI settings:

 

[MAIN]

LIST=C:\GPS\PushPins\PushPinList.txt

ICONS=0

SHORTPAUSE=6

LONGDELAY=6

PERK=0.01

Link to comment

I have set FLAVOR="AutoRoute" copyed from your ini. I have changed my ini to yours.

The first csv is loaded correctly but when the automated kestrokes have to chose the saperator in in the wizard it changes from the left ( Tab) to the Right ( comma ) and still gets hikedup. I also closed several program's and i dind't got a popup. As far as i can see it the pushpin.exe give's the command goto sepperator comma or go 2 tabs. Then it gives a enter. And than becouse the csv is a tab sepperated it gives a problem. If i do that manualy also wrong that way i get the same problem.

Edited by Jurgen & co
Link to comment

I have testid again but i have now discoverd that the problem is after importing the csv and going to the sepparatorscreen i come in the end screen it shout give a finish. But instead it go's back and come's again in the Sepperatorscreen and then get hikedup. So the problem is that de Finish button isn't used. Even if i would use your advise of renaming or give a other file as a input it wouldend work. I think the best way is to bild my self a batch file like you have don for Pushpin.exe could you give me some advise witch commands you have used in your Puschpin.exe?

 

With kind reggards

 

Jurgen & co

Link to comment

Hi Xangxa

 

I have made my one batch with Winbatch and it works perfect. It was not so easy for the first time. I have change the discription export from GSAK to %code %typ %con %Hint. So now i only have to say yes in the ballon for the discription. Therfor the loading goes a littelbit faster in Autoroute and i see the same as i would do with your system. In the netherlands Terrain and Difficulty are not so important. But i can always change that easy in the export from GSAK and then i dont have to cange it in the batch. Thanks for the advise and the good idea's.

 

Greeting from the Netherlands

Jurgen & co

Link to comment

From the forums on GPSpassion.com I found out that not all AutoRoute versions are created equal. Depending on the language (French, German, etc.) the shortcut keys/hot-keys will be different. This is critical to PUSHPINS since it uses keystroke buffering to perform it's automation (AutoRoute does not accept any other form of automation). The current version of PUSHPINS only supports the English versions of MSST and AutoRoute.

Edited by Xangxa
Link to comment
I want to use one of the original MSST icons for micros instead of your little black micro icon. How do I edit my macro to do this?

 

You won't have to change the macro: The graphic used is the one with a matching file name. So the data set "micros" uses the image file named micros.bmp

  1. Rename the micros.bmp that is currently being used to something like micros_old_icon.bmp
  2. Put the graphic you want to use in the directory where micros.bmp was located.
  3. Rename that graphic to micros.bmp

Link to comment
Thanks to you and your clear website I have been able to get caches onto Autoroute. However with GSAK's handling of the new 'child' waypoints I am getting those too. Any tips on filtering them out so all I get on Autoroute are the caches and not the Child waypoints?

 

Yes, this can be done easily. The inclusion of child waypoints is controlled by the export settings in GSAK. First, in your export macro (e.g., PushPins.txt) a customized setting must be used for every export that you wish to influence. Here is what one of the export entries look like:

EXPORT TYPE=SNT SETTINGS=PushPins FILE=C:\GPS\PushPins\Event.csv

I used the setting named "PushPins" so that I know it's a setting used specifically for creating pushpins. You can use any name you want. If your export macro doesn't use the SETTINGS parameters, add this to all the EXPORT entries.

 

The setting you specify in the export must be defined in GSAK. Press Ctrl+J or navigate in GSAK to /File /Export /Microsoft Streets and Trips Text File (or press Ctrl-J). At the top of the dialog entitled "Export Microsoft Streets and Trips TXT File" are the check boxes that control inclusion or exclusion of child waypoints. Make your choice and adjust any other settings on this dialog that you require. Then click the SAVE button and save it as PushPins (or whatever you've used in the SETTINGS= parameter in your export).

 

gsakexportsettings.gif

Link to comment
....since I upgraded to [GSAK] version 7 ....I am using the new feature to directly read the cache info from GSAK via the URL link gsak://%FF/offline/%code/%database. Unfortunately it has the side effect in MS&T that the option “Use hyperlinks from your imported data:” is not automatically used anymore but instead it defaults to the setting "Use Hyperlinks you add to the Pushpin balloon notes".

....is it possible to get a copy of your old source code as a starting point?

 

I've not been able to afford the upgrade to version 7 of GSAK. Therefore, the source code for PushPins.exe is now available under a Creative Commons license in case the technically proficient should wish to enhance it or port it (e.g., to AutoHotKey)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...