+Alan2 Posted November 3, 2006 Share Posted November 3, 2006 How would I do a macro to automatically create separate gpx files broken down with caches such as: under 20 miles from home, 20-30 miles, 40-50, 50-60, and over 60? right now I have to do each one separately every time I download my weekly cache updates. Quote Link to comment
+N8OFP - Del Posted November 3, 2006 Share Posted November 3, 2006 Here is a macro to want you asked for. This macro will create an individual gx file for caches 1) Less than 20 miles, 2) Between 20 and 30 miles, 3) between 30 and 40 miles, 4) between 40 and 50 miles, 5) between 50 and 60 miles, 6) over 60 miles from your selected center point. These files will be placed in your My Documents folder. Copy and paste the macro code below into a blank GSAK Macro, then save it. See this page "Add Macro Button to GSAK" for instructions on adding a macro button to the GSAK toolbar. ################################################################################################# This macro will filter through the selected database and create individual gpx files for # caches < less than 20 miles from the center point, between 20 and 30 miles, 30 to 40 miles # 40 to 50 miles, 50 to 60 miles, and over 60 miles # Get System Variables Set $user = GetEnvV("USERNAME") Set $PC = GetEnvv("ComputerName") Set $Path=GetEnvv("HomeDrive")+GetEnvv("HomePath") # Filter for caches less than 20 miles from center point MFILTER IF=.not. $d_Found and $d_Distance <20 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\LessThan20Miles.gpx" EndIf # Filter for caches between 20 and 30 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >20 and $d_Distance <30 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\Between20-30Miles.gpx" EndIf # Filter for caches between 30 and 40 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >30 and $d_Distance <40 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\Between30-40Miles.gpx" EndIf # Filter for caches between 40 and 50 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >40 and $d_Distance <50 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\Between40-50Miles.gpx" EndIf # Filter for caches between 50 and 60 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >50 and $d_Distance <60 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\Between50-60Miles.gpx" EndIf # Filter for caches over 60 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >60 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\Over60Miles.gpx" EndIf ################################################################################################ # embeded settings <data> VarName=$GPX TfmExportGpx] #fnmTo.Text=C:\Documents and Settings\Del\My Documents\GSAK_Files\Test cbxLimit.Text=No Limit cbxUserNotes.Checked=True chkActual.Checked=False chkChild.Checked=False chkDefault.Checked=False chkExtra.Checked=True chkFlag.Checked=False chkMyLogs.Checked=False chkSymbol.Checked=False edtFormat.Text=%Name edtMax.Text= edtMaxGps.Text=15 edtWaypoint.Text=%code rbtGpx.Checked=True rbtLoc.Checked=False edtProblem.Text= [TfmExportGpx.cbxRecent.Items] Count=10 Item0=File=all.gpx Path=C:\Progra~1\GSAK\POLYGON Item1=File=PPC_Home.gpx Path=C:\Documents and Settings\Del\My Documents\GSAK_Files Item2=File= Item3=File= Item4=File= Item5=File= Item6=File= Item7=File= Item8=File= Item9=File= <enddata> Quote Link to comment
+N8OFP - Del Posted November 3, 2006 Share Posted November 3, 2006 (edited) I have modified the macro to create a seperate database for each distance and import the each set of caches into the appropriate database. ################################################################################################# This macro will filter through the selected database and create individual gpx files for # caches < less than 20 miles from the center point, between 20 and 30 miles, 30 to 40 miles # 40 to 50 miles, 50 to 60 miles, and over 60 miles ################################################################################################ # Version Date and Details # 11/03/2006 Version 1.00 - Initial design. # 11/03/2006 Version 1.10 - Added create databases for each distance, and import caches into appropriate databases # ################################################################################################ # Get System Variables Set $Path=GetEnvv("HomeDrive")+GetEnvv("HomePath") ################################################################################################ # Generate GPX Files # Filter for caches less than 20 miles from center point MFILTER IF=.not. $d_Found and $d_Distance <20 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\LessThan20Miles.gpx" EndIf # Filter for caches between 20 and 30 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >20 and $d_Distance <30 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\Between20-30Miles.gpx" EndIf # Filter for caches between 30 and 40 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >30 and $d_Distance <40 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\Between30-40Miles.gpx" EndIf # Filter for caches between 40 and 50 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >40 and $d_Distance <50 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\Between40-50Miles.gpx" EndIf # Filter for caches between 50 and 60 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >50 and $d_Distance <60 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\Between50-60Miles.gpx" EndIf # Filter for caches over 60 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >60 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\Over60Miles.gpx" EndIf ######################################################################################################### # Create Databases If They Don't Already Exist # Generate GPX file for caches less then 20 miles from center point If .not. DatabaseExists("LessThan20Miles") Database name="LessThan20Miles" Action=create Else EndIf # Generate GPX file for caches between 20 and 30 miles from center point If .not. DatabaseExists("Between20-30Miles") Database name="Between20-30Miles" Action=create Else EndIf # Generate GPX file for caches between 30 and 40 miles from center point If .not. DatabaseExists("Between30-40Miles") Database name="Between30-40Miles" Action=create Else EndIf # Generate GPX file for caches between 40 and 50 miles from center point If .not. DatabaseExists("Between40-50Miles") Database name="Between40-50Miles" Action=create Else EndIf # Generate GPX file for caches between 50 and 60 miles from center point If .not. DatabaseExists("Between50-60Miles") Database name="Between50-60Miles" Action=create Else EndIf # Generate GPX file for caches over 60 miles from center point If .not. DatabaseExists("Over60Miles") Database name="Over60Miles" Action=create Else EndIf ###################################################################################################### # Import GPX File Into Database # Import LessThan20Miles.gpx file into database If DatabaseExists("LessThan20Miles") Database name="LessThan20Miles" Action=select If FileExists("$Path\My Documents\LessThan20Miles.gpx") Load File="$Path\My Documents\LessThan20Miles.gpx" EndIf EndIf # Import Between20-30Miles.gpx file into database If DatabaseExists("Between20-30Miles") Database name="Between20-30Miles" Action=select If FileExists("$Path\My Documents\Between20-30Miles.gpx") Load File="$Path\My Documents\Between20-30Miles.gpx" EndIf EndIf # Import Between30-40Miles.gpx file into database If DatabaseExists("Between30-40Miles") Database name="Between30-40Miles" Action=select If FileExists("$Path\My Documents\Between30-40Miles.gpx") and DatabaseExists("Between30-40Miles") Load File="$Path\My Documents\Between30-40Miles.gpx" EndIf EndIf # Import Between40-50Miles.gpx file into database If DatabaseExists("Between40-50Miles") Database name="Between40-50Miles" Action=select If FileExists("$Path\My Documents\Between40-50Miles.gpx") and DatabaseExists("Between40-50Miles") Load File="$Path\My Documents\Between40-50Miles.gpx" EndIf EndIf # Import Between50-60Miles.gpx file into database If DatabaseExists("Between50-60Miles") Database name="Between50-60Miles" Action=select If FileExists("$Path\My Documents\Between50-60Miles.gpx") and DatabaseExists("Between50-60Miles") Load File="$Path\My Documents\Between50-60Miles.gpx" EndIf EndIf # Import Over60Miles.gpx file into database If DatabaseExists("Over60Miles") Database name="Over60Miles" Action=select If FileExists("$Path\My Documents\Over60Miles.gpx") Load File="$Path\My Documents\Over60Miles.gpx" EndIf EndIf ################################################################################################ # embeded settings <data> VarName=$GPX TfmExportGpx] #fnmTo.Text=C:\Documents and Settings\Del\My Documents\GSAK_Files\Test cbxLimit.Text=No Limit cbxUserNotes.Checked=True chkActual.Checked=False chkChild.Checked=False chkDefault.Checked=False chkExtra.Checked=True chkFlag.Checked=False chkMyLogs.Checked=False chkSymbol.Checked=False edtFormat.Text=%Name edtMax.Text= edtMaxGps.Text=15 edtWaypoint.Text=%code rbtGpx.Checked=True rbtLoc.Checked=False edtProblem.Text= [TfmExportGpx.cbxRecent.Items] Count=10 Item0=File=all.gpx Path=C:\Progra~1\GSAK\POLYGON Item1=File=PPC_Home.gpx Path=C:\Documents and Settings\Del\My Documents\GSAK_Files Item2=File= Item3=File= Item4=File= Item5=File= Item6=File= Item7=File= Item8=File= Item9=File= <enddata> Edited November 3, 2006 by N8OFP - Del Quote Link to comment
+Alan2 Posted November 4, 2006 Author Share Posted November 4, 2006 That's phenomenal! Now I just have to figure out how to load it all in. Thanks for all your hard work. Alan Quote Link to comment
+N8OFP - Del Posted November 4, 2006 Share Posted November 4, 2006 Now I just have to figure out how to load it all in. Open GSAK Click on Macro Click on Edit/Create Copy the code from the post above Paste it into the GSAK New Macro window Click on File Click on Save As Name the macro what ever you like, just make sure you use the .txt extension Example: CachesGroupedByDistance.txt Close the macro window Create a button on the GSAK tool bar for the macro. See Add Macro Button To GSAK Tool Bar Let me know if you have any questions Del Quote Link to comment
+ve6dave Posted November 4, 2006 Share Posted November 4, 2006 Great macro, but when I ran it the code field was filled with smart name. I was looking through the macro, but I couldn't see where this may have been referenced. I probably just missed it. Quote Link to comment
+Alan2 Posted November 4, 2006 Author Share Posted November 4, 2006 (edited) That's phenomenal-amazing!!!! A couple of more favors. The files are too big for my PPC so I need to break them up into smaller ranges as shown below. Note that I added hundredths otherwise caches on round tens of miles will be missed. Also, when the file is written can the name include the current date such as 11-3-06 20.01 to 30 miles I don't need to have new databases created and saved in GSAK so you can delete that part as it will clutter up the database file. As long as I keep my original default which I update weekly; that's all that I need File name actual computation in program (Current Date) To 25 (actual program will be < 25.01) (Current Date) 25.01-30 (actual program will be >25 to <30.01) (Current Date) 30.01-35 (actual program will be >30 to <35.01) (Current Date) 35.01-40 (actual program will be >35 to <40.01) (Current Date) 40.01-45 (actual program will be >40 to <45.01) (Current Date) 45.01-50 (actual program will be >45 to <50.01) (Current Date) 50.01-55 (actual program will be >50 to <55.01) (Current Date) 55.01-60 (actual program will be >55 to <60.01) (Current Date) 65.01-70 (actual program will be >60 to <65.01) (Current Date) over 70 (actual program will be >65) Comment to ve6dave: I get the 10 digit smartname also but I believe that's a function of what you have set in GSAK. I also get miles from home, D/T, cache type, container type, hider by setting up GSAK to create that when the gpx files are created. That comes in handy when I use the gpx files to create a maplet for my Mapopolis program that overlays all the caches on the navigation street maps. That way I can tap an icon on the map and get all that info automatically. Let me know if anyone's interested and I'll post how I do that. Edited November 4, 2006 by Alan2 Quote Link to comment
+N8OFP - Del Posted November 5, 2006 Share Posted November 5, 2006 ve6dave when I ran it the code field was filled with smart name. I was looking through the macro, but I couldn't see where this may have been referenced. This macro doesn't have any controller over what fields are displayed in the new databases. You can control that by using the Tools > Options > Display settings. Alan2 when the file is written can the name include the current date such as 11-3-06 20.01 to 30 miles I believe that can be done. I've never tried it but it should work. I'll see what I can come up with. I don't need to have new databases created and saved in GSAK so you can delete that part as it will clutter up the database file. The first version of the macro does not create any additional databases, it simply creates the gpx files in the My Documents file. So until I get your other requested mods done you can use that version and not have the extra databases. Quote Link to comment
+N8OFP - Del Posted November 5, 2006 Share Posted November 5, 2006 OK, Here's another version. This version adds the date (Formate YYYYMMDD) to the name of each file, I've also added a user input that allows the user to select if the macro create the databases and imports the caches (Yes or No). I'm still working on adding the other distances per Alan2's request. ################################################################################################# This macro will filter through the selected database and create individual gpx files for # caches < less than 20 miles from the center point, between 20 and 30 miles, 30 to 40 miles # 40 to 50 miles, 50 to 60 miles, and over 60 miles ################################################################################################ # Version Date and Details # 11/03/2006 Version 1.00 - Initial design. # 11/03/2006 Version 1.10 - Added create databases for each distance, and import caches into appropriate databases # 11/04/2006 Version 1.15 - Added Date string file GPX file name ################################################################################################ # Get System Variables Set $Path=GetEnvv("HomeDrive")+GetEnvv("HomePath") ################################################################################################ # Generate Date String Set $Date = DateToString($_Today) ################################################################################################ # Generate GPX Files # Filter for caches less than 20 miles from center point MFILTER IF=.not. $d_Found and $d_Distance <20 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\"$Date"LessThan20Miles.gpx" EndIf # Filter for caches between 20 and 30 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >20 and $d_Distance <30 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\"$Date"Between20-30Miles.gpx" EndIf # Filter for caches between 30 and 40 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >30 and $d_Distance <40 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\"$Date"Between30-40Miles.gpx" EndIf # Filter for caches between 40 and 50 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >40 and $d_Distance <50 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\"$Date"Between40-50Miles.gpx" EndIf # Filter for caches between 50 and 60 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >50 and $d_Distance <60 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\"$Date"Between50-60Miles.gpx" EndIf # Filter for caches over 60 miles from center point MFILTER IF=.not. $d_Found and $d_Distance >60 IF $_FilterCount > 0 Macroset Dialog=GPX VarName=$GPX Export Type=GPX Settings=<macro> File="$Path\My Documents\"$Date"Over60Miles.gpx" EndIf ################################################################################################# # User select Create Databases (Yes or No) CHOOSE msg="Create Databases?" opt1=Yes opt2=No #Delay=10 If $Result = 1 ################################################################################################# # Create Databases If They Don't Already Exist # Generate GPX file for caches less then 20 miles from center point If .not. DatabaseExists("LessThan20Miles") Database name="LessThan20Miles" Action=create Else EndIf # Generate GPX file for caches between 20 and 30 miles from center point If .not. DatabaseExists("Between20-30Miles") Database name="Between20-30Miles" Action=create Else EndIf # Generate GPX file for caches between 30 and 40 miles from center point If .not. DatabaseExists("Between30-40Miles") Database name="Between30-40Miles" Action=create Else EndIf # Generate GPX file for caches between 40 and 50 miles from center point If .not. DatabaseExists("Between40-50Miles") Database name="Between40-50Miles" Action=create Else EndIf # Generate GPX file for caches between 50 and 60 miles from center point If .not. DatabaseExists("Between50-60Miles") Database name="Between50-60Miles" Action=create Else EndIf # Generate GPX file for caches over 60 miles from center point If .not. DatabaseExists("Over60Miles") Database name="Over60Miles" Action=create Else EndIf ###################################################################################################### # Import GPX File Into Database # Import LessThan20Miles.gpx file into database If DatabaseExists("LessThan20Miles") Database name="LessThan20Miles" Action=select If FileExists("$Path\My Documents\"+$Date+"LessThan20Miles.gpx") Load File="$Path\My Documents\"$Date"LessThan20Miles.gpx" EndIf EndIf # Import Between20-30Miles.gpx file into database If DatabaseExists("Between20-30Miles") Database name="Between20-30Miles" Action=select If FileExists("$Path\My Documents\"+$Date+"Between20-30Miles.gpx") Load File="$Path\My Documents\"$Date"Between20-30Miles.gpx" EndIf EndIf # Import Between30-40Miles.gpx file into database If DatabaseExists("Between30-40Miles") Database name="Between30-40Miles" Action=select If FileExists("$Path\My Documents\"+$Date+"Between30-40Miles.gpx") Load File="$Path\My Documents\"$Date"Between30-40Miles.gpx" EndIf EndIf # Import Between40-50Miles.gpx file into database If DatabaseExists("Between40-50Miles") Database name="Between40-50Miles" Action=select If FileExists("$Path\My Documents\"+$Date+"Between40-50Miles.gpx") Load File="$Path\My Documents\"$Date"Between40-50Miles.gpx" EndIf EndIf # Import Between50-60Miles.gpx file into database If DatabaseExists("Between50-60Miles") Database name="Between50-60Miles" Action=select If FileExists("$Path\My Documents\"+$Date+"Between50-60Miles.gpx") Load File="$Path\My Documents\"$Date"Between50-60Miles.gpx" EndIf EndIf # Import Over60Miles.gpx file into database If DatabaseExists("Over60Miles") Database name="Over60Miles" Action=select If FileExists("$Path\My Documents\"+$Date+"Over60Miles.gpx") Load File="$Path\My Documents\"$Date"Over60Miles.gpx" EndIf EndIf EndIf If $Result = 2 EndIf ################################################################################################ # embeded settings <data> VarName=$GPX TfmExportGpx] #fnmTo.Text=C:\Documents and Settings\Del\My Documents\GSAK_Files\Test cbxLimit.Text=No Limit cbxUserNotes.Checked=True chkActual.Checked=False chkChild.Checked=False chkDefault.Checked=False chkExtra.Checked=True chkFlag.Checked=False chkMyLogs.Checked=False chkSymbol.Checked=False edtFormat.Text=%Name edtMax.Text= edtMaxGps.Text=15 edtWaypoint.Text=%code rbtGpx.Checked=True rbtLoc.Checked=False edtProblem.Text= [TfmExportGpx.cbxRecent.Items] Count=10 Item0=File=all.gpx Path=C:\Progra~1\GSAK\POLYGON Item1=File=PPC_Home.gpx Path=C:\Documents and Settings\Del\My Documents\GSAK_Files Item2=File= Item3=File= Item4=File= Item5=File= Item6=File= Item7=File= Item8=File= Item9=File= <enddata> Quote Link to comment
+N8OFP - Del Posted November 8, 2006 Share Posted November 8, 2006 Sorry for the delay, but I lost my hard drive on my laptop and just got the new one setup. I'll try to get the distance changes finished up shortly. Quote Link to comment
+Alan2 Posted November 9, 2006 Author Share Posted November 9, 2006 OK Thanks Take your time. Sorry you lost your hard drive. Quote Link to comment
+renruts Posted November 10, 2006 Share Posted November 10, 2006 Here is something a little different than what you have now, but works great for me. Instead of breaking the caches down by a hard radius, I break the files into number of caches and name it with database name -distance from start - distance to finish, limiting the files to 190 caches per. ex: PA-5.42 - 19.95.gs There are 3 files, the first file launches the next 2 in order. It is the file I set my macro button in the tool bar to call. The second file is to export to magellan sd format and the last exports the same caches to gpx files of the same name. It is then very easy for me to correlate the gpx file on the ppc to the file I have on my gps. If you want to change the number of caches per file adjust the range= to your liking, although if you use magellan 200 is the max for files with extra info. I got the idea after downloading and playing with the alpha sort macro on the gsak site forums. There is some good info over there also... Here are 3 files Distance_Sort -> used to launch magellan and gpx sort / export #Call the Magellan_Distance_Sort, and the GPX_DISTANCE_SORT ShowStatus msg="Please wait; creating eXplorist and GPX files sorted by distance" FileErase File="C:\Documents and Settings\$user\My Documents\My GPS\Geocaches\*.*" OnError=Continue MACRO File="C:\Program Files\GSAK\Macros\Magellan_Dist_Sort.txt" FileErase File="C:\Documents and Settings\$user\My Documents\My GPS\Geocaches\GPX\*.*" OnError=Continue MACRO File="C:\Program Files\GSAK\Macros\GPX_Dist_Sort.txt" Magellan_dist_sort -> break caches out in distance from center in 190 count files. ############################################# # # # Explorist Distance Sort and Export # # Based on # # Magellan Alphabetical Sort / Export # # # # # ############################################# ############################################# # Get PC User name and set Database # ############################################# Set $user = GetEnvV("USERNAME") $Database = $_CurrentDatabase ################################################################# #Check to see of folder exists if not then create and set # ################################################################# $BatFile = $_Install + "\Temp\temp.bat" $Folder = "C:\Documents and Settings\$user\My Documents\My GPS\Geocaches\$Database" If .not. FolderExists($Folder) $result = PutFile($BatFile, "MD " + quote($Folder)) FileOpen File="$BatFile" Wait=yes EndIf ############################################# # Delete Exisitng Explorist Files # ############################################# FileErase File="$Folder\*.*" OnError=Continue ########################################################################## # Set Database, Clear user and macro Flags, Sort Database By Destination # ########################################################################## USERFLAG type=clear range=all Macroflag type=clear range=all SORT By=Distance Sequence=A # SORT By=Description Sequence=A ############################################# # Create Magellen Export Files # ############################################# MacroFlag type=set range=all UserFlag type=clear range=all Mfilter If=$d_MacroFlag While $_FilterCount <> 0 Goto Position=Top UserFlag type=set range=190 MFilter if=$d_MacroFlag .and. $d_UserFlag Macroset Dialog=MagellanSD VarName=$MagellanSD GoTo Position=Bottom $LastDistance =$d_Distance Goto Position=Top $FirstDistance =$d_Distance Export Type=MAGSD Settings=<macro> File="$Folder\$Database-$FirstDistance - $LastDistance.gs" ############################################# # now prepare for your next 200 records # ############################################# MFilter if=$d_UserFlag MacroFlag type=clear range=filter MFilter if=$d_MacroFlag EndWhile ############################################# # Reset Database # ############################################# USERFLAG type=clear range=all Macroflag type=clear range=all SORT By=Distance Sequence=A ############################################# # Embeded Settings # ############################################# <data> VarName=$MagellanSD [TfmMagPro] edtFormat.Text=%Name edtProblem.Text= #fnmTo.Text=C:\My GPS\Geocaches\190.gs cbxGps.Checked=False edtMaxGps.Text=20 edtWaypoint.Text=%Code cbxFormat.Text=Explorist Geocaches chkMacro.Checked=False File1.Filename= chkChild.Checked=False chkFlag.Checked=False [TfmIcons] rbtBoth.Checked=False rbtStatus.Checked=True rbtType.Checked=False [icons]Archived=aerial CITO+Archived=aerial CITO+Found=aerial CITO+Not Found=aerial CITO+Placed=aerial CITO=aerial Event+Archived=airport Event+Found=airport Event+Not Found=airport Event+Placed=airport Event=airport Found=crossed square LetterBox+Archived=house LetterBox+Found=house LetterBox+Not Found=house LetterBox+Placed=house LetterBox=house Locationless+Archived=amusement park Locationless+Found=amusement park Locationless+Not Found=amusement park Locationless+Placed=amusement park Locationless=amusement park Multi+Archived=box Multi+Found=box Multi+Not Found=box Multi+Placed=box Multi=box Mystery+Archived=boating Mystery+Found=boating Mystery+Not Found=boating Mystery+Placed=boating Mystery=boating Not Found=box Placed=house Traditional+Archived=crossed square Traditional+Found=crossed square Traditional+Not Found=crossed square Traditional+Placed=crossed square Traditional=crossed square Version4.3 Virtual+Archived=ATM Virtual+Found=ATM Virtual+Not Found=ATM Virtual+Placed=ATM Virtual=ATM Web Cam+Archived=auto repair Web Cam+Found=auto repair Web Cam+Not Found=auto repair Web Cam+Placed=auto repair Web Cam=auto repair <enddata> gpx_dist_sort -> same as magellan but gpx ############################################# # # # GPX Distance Sort and Export # # Based on # # Magellan Distance Sort / Export # # # # # ############################################# ############################################# # Get PC User name and set Database # ############################################# Set $user = GetEnvV("USERNAME") $Database = $_CurrentDatabase ################################################################# # Check to see of folder exists if not then create and set # ################################################################# $BatFile = $_Install + "\Temp\temp.bat" $Folder = "C:\Documents and Settings\$user\My Documents\My GPS\Geocaches\GPX\$Database" If .not. FolderExists($Folder) $result = PutFile($BatFile, "MD " + quote($Folder)) FileOpen File="$BatFile" Wait=yes EndIf ############################################# # Delete Exisitng GPX Files # ############################################# FileErase File="$Folder\*.*" OnError=Continue ########################################################################## # Clear user and macro Flags, Sort Database By Destination # ########################################################################## USERFLAG type=clear range=all Macroflag type=clear range=all SORT By=Distance Sequence=A # SORT By=Description Sequence=A ############################################# # Create GPX Export Files # ############################################# MacroFlag type=set range=all UserFlag type=clear range=all Mfilter If=$d_MacroFlag While $_FilterCount <> 0 Goto Position=Top UserFlag type=set range=190 MFilter if=$d_MacroFlag .and. $d_UserFlag Macroset Dialog=GPX VarName=$GPX GoTo Position=Bottom $LastDistance =$d_Distance Goto Position=Top $FirstDistance =$d_Distance Export Type=GPX Settings=<macro> File="$Folder\$Database-$FirstDistance - $LastDistance.gpx" ############################################# # now prepare for your next 200 records # ############################################# MFilter if=$d_UserFlag MacroFlag type=clear range=filter MFilter if=$d_MacroFlag EndWhile ############################################# # Reset Database # ############################################# USERFLAG type=clear range=all Macroflag type=clear range=all SORT By=Distance Sequence=A Quote Link to comment
+Alan2 Posted November 10, 2006 Author Share Posted November 10, 2006 Thanks Renruts. I have over 4000 caches in GSAK within over 100 miles. It seems that your program, while great, would create too many files. Also, what I do once the GSAK mileage files are created is to create other maplet files for my Mapopolis mapping program. This overlays the cache icons so when I tap on the map, I can see the mileage from home and then open the correct gpxsonar program for paperless cache info about the cache. Thanks for your ideas though. Alan Quote Link to comment
+sarhound Posted November 10, 2006 Share Posted November 10, 2006 I'm using Mapopolis now, and I'd like to see how you set up your maplets to display the info when the icon is tapped.... sounds really useful. Quote Link to comment
+renruts Posted November 10, 2006 Share Posted November 10, 2006 Thanks Renruts. I have over 4000 caches in GSAK within over 100 miles. It seems that your program, while great, would create too many files. Also, what I do once the GSAK mileage files are created is to create other maplet files for my Mapopolis mapping program. This overlays the cache icons so when I tap on the map, I can see the mileage from home and then open the correct gpxsonar program for paperless cache info about the cache. Thanks for your ideas though. Alan Ouch that is alot of caches to keep up with in such a small radius and would produce quite a few files! Quote Link to comment
+bulletproofcj7 Posted November 11, 2006 Share Posted November 11, 2006 Ok how do I use this now?. When I run the macro it generates gpx/loc files 6 times and leaves the last one (60 plus miles) on the screen. How do I switch between the different mileage cataories? Quote Link to comment
+Alan2 Posted November 11, 2006 Author Share Posted November 11, 2006 (edited) I'm using Mapopolis now, and I'd like to see how you set up your maplets to display the info when the icon is tapped.... sounds really useful. Using GSAK to create the gpx files, create "smart" 10 digit waypoint descriptors that include D/T, smart name, type of cache, container type, etc. These are all set in the GSAK GPX output page. In GSAK Waypoint name descriptor page I insert %smart %dist %By %code set for 10 which gives me the Smart name in 10 digits for my GPS. and and when I tap the Mapopolis cache icon will show smart name, the distance from home in miles, who placed the cache and the GCabcd code. In cache desption format I insert %typ (%Dif/%Ter) %con which additionally shows the cache type, D/T and type of container when I tap the icon. Check GSAK HELP for other codes you can enter beside the ones I use I believe that some GPSr's will also display this info like Mapopolis but I'm not sure if it will show as much info. Then using gpxtomaplet, create the Mapopolis maplet files and paste into your PPC memory card that will overlay your Mapopolis county maps. Then when you tap the icon on the Mapopolis screen you'll have the afrementioned description. If you decide to naviagte there, tap again and Navigate To. If course, you want to use gpxsonar for the paperless description of the cache web page but the maplet icon description saves letsof time when you're trying to select whcih cache to hit along the way. This is a great feature when I'm just driving around my home area too. Edited November 11, 2006 by Alan2 Quote Link to comment
Recommended Posts
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.