Contents - Index


Load (command)

LOAD [<Settings="name">]  [<File="path\file">]  [<database="name">] [<ShowStats=No|Yes|Settings>]  [<Lock=dbfields>] [<Notes=Prompt|Add|Replace|Ignore>]

The LOAD command enables you to open and load GPX, LOC, and Zip files.

Settings = Name of the corresponding settings you would like to use for this load. You must have previously created these settings from  the load dialog. If you do not provide a settings parameter, then the current values for the corresponding load dialog will be used.

File=  Fully qualified file name. For example, "c:\program files\GSAK\My Files\1234.GPX". If you have provided a settings parameter, then the File= parameter will override the file name in those settings.

Database = The database name to select before loading.  If you do not enter the Database= parameter, GSAK will use your current database. You need to surround this parameter in double quotes if the name contains spaces.

ShowStats - Optional, default = No. The macro language has been designed to "automate GSAK". One of default behaviours of this automation is to suppress all GUI type notification messages. This ensures that when you run a macro it "automates" and you are not constantly having your macro stopped by informational messages. However, some messages you may like to still see - like the "statistics box" after the load of GPX files. Note that using Yes or No forces that option regarless of the "Settings" used, if you want the summary display to respect the corresponding option used for "Settings" then us ShowStats=Settings.

Lock - Optional. This parameter enables you to "lock" individual database fields when locking the whole record is not required (some like date last update don't make sense and you can't). This lock will prevent that field(s) from being overridden with the incoming data from the GPX file. You can include more that one database variable by separating with a; (semi colon). For example if you wanted to load a GPX file but make sure the state and country fields will not be overridden use the following code:

Load Settings="my settings" Lock=$d_State;$d_Country


Notes - One of the goals of the macro language is to enable GSAK to perform multiple actions without interruption from messages in the GUI. Currently the LOAD command "breaks" this philosophy when you load a GPX file that has user notes (one from Watcher or a GSAK exported GPX file). This causes the macro to halt and you have to action the corresponding dialog before the macro can continue. The "Notes" parameter now allows you to decide what option to take prior to running the LOAD command and allows the macro to run uninterrupted:

Prompt - This is the default (what GSAK uses if the parameter is not used) and duplicates the existing behaviour of having a dialog prompt you for what action you would like to take when there are existing notes in the database.

Add - All user notes are added to the existing user notes

Replace - All user notes are replaced by the corresponding note in the GPX file

Ignore - Any notes in the GPX file are ignored
 

This also means your change log will be an accurate representation of any changes actually made when you do the load. 

Alpha List         Category List