Streets On A Disk (32 bit version)
can easily respond to commands sent from another program (or even
manually typed with a text editor). In this way you can use Streets
32 as a map display for another custom application. This can also be
useful if you want to automate a mapping task and save time.
While Streets 32 is running, it is constantly testing for the presence of specially named a command file. A command file can contain an unlimited number of commands. However, it is a good idea to group commands to complete a small task and then test the log file for errors before proceeding.
Route Commands:
Use this command to add stops to the travel route list. Each stop must be provided with X,Y coordinates and a descriptive name (that will be displayed in the route list). There is no limit to the number of points that you can enter with this one command. At the end of the list, add a line with "@END".
@ADD_TO_ROUTE x y name ... @END
@ADD_TO_ROUTE 1000000000 1000000000 Main Street Cafe 2142536360 1845653830 John Smith 8457659490 1907595720 Store #1 9655744000 1765701920 Empire State Bldg. 1985705850 1010102050 Post Office @END
Use this command to display a single address with normal search zoom and error menus.
@ADDRESS_SEARCH_MENU address zip code
Note: Be sure to provide all three lines even if the zip code line is blank.
@ADDRESS_SEARCH_MENU 100 main st 12345
The address is displayed on the screen. If the address is not
visible on the user's view of the map, a zoom menu is displayed.
This function will return the X,Y coordinates of an address. If a zoom range is given in miles, Streets On A Disk will automatically zoom around the address (if found).
@ADDRESS_XY (miles) address zip code
Note: Be sure to provide all three lines even if the zip code line is blank.
@ADDRESS_XY 100 main st 12345
--> 1000000000 1000000000
* Can't find name ... * Can't find matching address number. * Can't find matching zip code. * Can't find matching street prefix N,S,E,W,... * Can't find matching street suffix N,S,E,W,... * Multiple solutions --> * Closest Known Address --> 123 main street
Use this function to erase the log file and clear the data. A new log file will be automatically created when the next command is issued.
The results of the next command issued will appear on the first
line of the new log file.
Use this command to close all maps in use by the program. After issuing this command, the FILES menu "Map files in use" list will be empty.
This command will display a custom message in the Streets On A Disk program. The user can clear the menu message by selecting "OK".
@CUSTOM_MENU_OK text
@CUSTOM_MENU_OK Hello World!
This command will display a custom message in the Streets On A Disk program. The user can respond by either selecting "YES" or "NO".
@CUSTOM_MENU_YES_NO question
@CUSTOM_MENU_YES_NO Do you want to display all customers?
If the user selects "YES", the word "YES" will be sent to the log file.
If the user presses "NO" or "CANCEL", the word "NO" will be sent
to the log file.
Use this command to generate travel directions after calculating a route.
@GET_TRAVEL_REPORT menu
If menu = 1 Display travel report in a Streets On A Disk pop-up menu.
If menu = 0 Do not display the report. Only send it to the log file.
@GET_TRAVEL_REPORT 1
Use this command to get a copy of all map files in use. Each filename is listed in its display order from line 1 - 12. That is, if a map was loaded into the third line of the FILES menu, will be listed in the third line of the log file. Note that only eleven map names can be displayed in the FILES menu. However there is a hidden map #12 that is used to store GPS points.
@GET_MAP_FILE_LIST
c:\program files\st32\ca037.mp1 c:\maps\ca111.mp1 c:\maps\ca075.mp1 c:\maps\mydata.mp1 c:program files\st32\gps\gps.mp1
Notice that blank lines above indicate that not all lines are in use.
Use this command to get a list of all stops in the travel route menu. The stop name will be surrounded by quotes and followed by the X,Y coordinates and the route status. Route status indicates whether the route path has been calculated to that point (1 = YES, 0 = NO).
@GET_ROUTE_LIST Route List --> "9th Ave", 979252265, 1081529457, 1 "357 13th St E, 57201", 979453215, 1081449846, 0 "1119 Konrady Dr , 57201-6740", 979439617, 1081548327, 0 "6th Ave", 979188811, 1081487950, 0 "Kampeska Blvd", 979128006, 1081356789, 0 "3rd Ave", 979137545, 1081443642, 0 @END
Use this command to get a list of all travel report options
selected (or not selected) by the user.
@GET_TRAVEL_REPORT_OPTIONS --> 111111 0 0 0 1 0.25 30.00 @END
(bool) Turn left... (bool) Street Name (bool) Direction (bool) Distance (bool) Speed (bool) Stop Name (bool) Subtotals (bool) Show_off_road (bool) Detail (bool) layout (sentences/columns) (float) travel_cost (float) fuel_usage
Used to get the screen boundary and range of the user's map window.
@GET_ZOOM
@GET_ZOOM --> 979112640 1081286932 979563945 1081558509 --> 2.257 @END Returns the X,Y coordinates of the lower left corner and the upper right corner of the visible map in use. Also returns in miles.
Use this function to display any number of points on the map given latitude \ longitude coordinates, the display type, and the display text for each point.
Note: The key word "@GPS_LATLON" is optional and can be omitted. This allows compatibility with previous Streets On A Disk versions.
Important: This function must not share the command file with any other commands.
@GPS_LATLON lat lon ptype title ...
Latitude/longitude can be either in decimal degrees or degrees:minutes:seconds. Note that longitude is always negative in the continental USA.
Point type (ptype) is 8 letters or less (with no spaces) and should correspond to a point display type assigned in the options menu.
The remainder of the command line is for the title to be displayed near the point token on the map.
@GPS_XY 44.91652757 -97.15778406 airport Smith Field 44:56:10.426162 -97:7:21.254016 user Store #1 44:52:6.417672 -97:2:14.689416 city Sample City
Use this function to display any number of points on the map given X,Y coordinates, the display type, and the display text for each point.
Important: This function must not share the command file with any other commands.
@GPS_XY X Y ptype text ...
X,Y coordinates must be provided and are available as output from many other command functions.
Point type (ptype) is 8 letters or less (with no spaces) and should correspond to a point display type assigned in the options menu.
The remainder of the command line is for the title to be displayed near the point token on the map.
@GPS_XY 1827364895 16689375465 airport Smith Field 1465439268 13757348738 city Sample City 1038465857 10384757658 user Store #1
Use this function to erase any existing GPS points displayed on
the map. Note that when you use @GPS_LATLON or @GPS_XY, any existing
GPS points are automatically erased.
Use this function to temporarily highlight any number of points on the map. If only a single point is given, Streets On A Disk will automatically include a highlight/zoom menu.
@HIGHLIGHT_POINTS menu x y title ... @END
menu Used to display or hide the highlight zoom menu. 1 always show 0 never show -1 only show for single point (same as not including any value)
X,Y coordinates must be provided.
The remainder of the command line is for the title to be displayed
near the point token on the map. This title will only be visible when
a single point is submitted. For multiple points, this field is
ignored.
@HIGHLIGHT_POINTS 0 979244130 1081367670 Hello World! 989244141 1071367671 Hello Again! @END
The "0" shown above will suppress the display of the zoom
menu.
Converts a latitude / longitude value into an X,Y coordinate.
@LATLON_2_XY lat lon
@LATLON_2_XY 44:53:57.873074 -97:6:54.256623
--> 979244130 1081367670 @END
* Lat/Long coordinates not available. * Lat/Long parameters invalid. * Conversion Error
Use this command to add map files to the display list (see the FILES menu).
@PUT_MAP_FILE_LIST i filename
Where "i" is the index to the list position (1-12) and "filename" is the full path and name to the map file.
Note 1: Only eleven map names can be displayed in the FILES menu. However there is a hidden map #12 that is used to store GPS points.
Note 2: If a map file already occupies the list position selected, it will automatically be closed and the new file will be used.
Note 3: If a filename is not included in the command, then the list position will be cleared of any existing filename.
@PUT_MAP_FILE_LIST 2 c:\maps\ca111.mp1
Use this command to implement a point search. The user will see all the normal response menus.
@POINT_SEARCH_MENU point_name point_type
point_name The name of the point desired. Partial names are ok. point_type The point type to be searched (example: city, hospital, airport...). If left blank, all point types will be searched.
@POINT_SEARCH_MENU Watertown city
Use this command to change travel report options selected (or not selected) by the user.
@PUT_TRAVEL_REPORT_OPTIONS 111111 0 0 0 1 0.25 30.00
(bool) Turn left... (bool) Street Name (bool) Direction (bool) Distance (bool) Speed (bool) Stop Name (bool) Subtotals (bool) Show_off_road (bool) Detail (bool) layout (sentences/columns) (float) travel_cost (float) fuel_usage
Use this command to sort the travel stops in the route menu list. Stops are sorted by distance to reduce unnecessary travel.
@ROUTE_AUTOSORT (sort_all)
(bool) sort_all 1 sort all stops in the list 0 sort all stops except the last one
Use this command to find the fastest travel path between travel stops.
The travel path will be displayed on the map. You can then call @GET_TRAVEL_REPORT to generate written travel directions.
* Route area too large for memory... * Can't find complete travel path.
Use this command to clear the travel list and the travel path
displayed on the map.
Use this command to clear the travel path displayed on the map.
The travel stop list will not be erased.
Use this command to set the route search area to NORMAL or LARGE. The NORMAL mode finds a route faster and tests only the streets needed for a typical route. The LARGE mode takes longer to find a travel path and tests more streets.
@SET_ROUTE_SEARCH_AREA mode
(bool) mode 0 NORMAL 1 LARGE
Converts an X,Y map coordinate into latitude / longitude.
@XY_2_LATLON X Y
@XY_2_LATLON 979244130 1081367670
--> 44.89940904 -97.11507128 --> 44:53:57.872553, -97:6:54.256606 @END
Data is returned in both decimal degrees and
degrees:minutes:seconds.
Used to print the map image on the screen.
@PRINT_MAP use_menu
(bool) use_menu 1 Print with user menu 0 Print without user menu
Use this command to load the map image into the Windows clipboard. This allows you to paste the map picture into other software programs.
Use this command to clear any highlighted items on the map. Items
will be highlighted when the search or ID is implemented. This
command does not erase any permanent features, a travel route, or
labels.
Used to display and refresh the map screen (usually after making changes).
@DRAW_MAP mode
mode: 0 Draw overall map 1 Update map without changing the zoom range 2 Update map labels only without changing the zoom range
Used to shift the map in any direction. Depending on the scroll range, the map can scroll either 1/2 screen or one full screen.
@SCROLL_MAP direction
direction: UP DOWN LEFT RIGHT
Use this command to set the scroll range to either 1/2 screen or one full screen.
@SET_SCROLL_RANGE amount
amount: FULL HALF
This command is used to select the position and range of the map displayed.
@ZOOM bx0 by0 bx1 by1 where: bx0,by0 is the lower left corner of the map bx1,by1 is the upper right corner of the map
@ZOOM cx cy range where: cx,cy the center of the map to be displayed range the scale of the map (in miles)
Use this command to save the screen image (identical to the DRAW menu feature).
@SAVE_SCREEN_IMAGE i title
i the index (1-16) of the picture as seen in the DRAW menu. title the description to be displayed in the DRAW menu.
Use this command to restore a previously saved screen image (identical to the DRAW menu feature).
@RESTORE_SCREEN_IMAGE i
i the index (1-16) of the picture as seen in the DRAW menu.
Use this command to copy the map screen to a bitmap (BMP) file. This is one way to create a map image for use in other programs.
@SAVE_SCREEN_IMAGE_TO_FILE file_name
file_name The complete path and file name for the new picture file.
Note: The output file name should always have a ".BMP"
extension.
Use this command to make sure that the Streets On A Disk program
is not hidden by other Windows programs. Calling this command will
also make Streets On A Disk visible - even if reduced.
Use this command to preset the import points menu before importing new data.
@SET_IMPORT_POINTS name1 name2 name3 ptype ptype_text address city state zip lat lon x y comment1 comment2 comment3 use_all_fields
These parameters match the items in the EDIT/POINT/IMPORT menu. All values are indexes to fields in the import file (except "use_all_fields" is boolean).
name1,2,3 the field # containing the point name ptype the field # for a point type. This allows you to have use a field in the import file to load the point type description. If left zero, all point types are given the value given in ptype_text. ptype_text If you want all import points to be given the same token type, enter the description here. Example: city, school, airport... Note: This value will only be used if ptype is zero. address the field # containing the street address city the field # containing the city name state the field # containing the state zip the field # containing the zip code lat,lon the field # containing the latitude/longitude (optional) x,y the field # containing the x,y coordinates (optional) comment1,2,3 the field # containing any special comments use_all_fields: 1 indicates transfer all fields present in the import file. 0 only import fields selected with a number other than 0.
@SET_IMPORT_POINTS 1 2 3 0 church 5 6 7 8 0 0 0 0 9 10 11 1
Use this command to overlay addresses or other database information on the map. The import file that you provide must be a quote/comma delimited text file.
Usually you will need to provide a name, address, and zip code to import a customer list or other database. As an alternate, you can import points by providing the latitude/longitude or x,y coordinates.
Before calling @IMPORT_POINTS, you will want to setup the import menu using the command @SET_IMPORT_POINTS. If you are importing addresses, you will need to call @AUTOPLACE after calling @IMPORT_POINTS.
"Henry Hudson Bridge","other",40.87777761,-73.92305563 "Baker Field","park",40.87305540,-73.91444457 "Public School 98","school",40.86777764,-73.91777794 "P C Rapid Transit Yard","other",40.86666651,-73.91361124 "Inwood","city",40.86555538,-73.92722236
@IMPORT_POINTS import_filename fout_index
import_filename the path and name to the import file fout_index the index to the file given in the FILES menu (1-12)
@END --> Total points searched: 216 --> Total points located: 190 --> Remaining lost points: 26 C:\a\Streets\ST000001.TMP @END
The file name returned is a temporary file that contains the
autoplace results. This file name is only valid until the next
command is issued or the user issues a command. If you need this
information, copy it to another file.
Use this command to create a new map file. Do not include an extension. A series of six files will be created with the extensions of ".MP1",".MP2",".MP3",".MP4",".MP5",and ".MP6".
Note: If the file already exists, this command will not harm the file.
@CREATE_NEW_MAP_FILE filename
After importing points with @IMPORT_POINTS, use this command to position points on the map based on their addresses. AUTOPLACE is not needed for points imported with latitude/longitude or x,y coordinates.
@AUTOPLACE fout_index
fout_index the index to the file listed in the FILES menu (1-12)
When Streets On A Disk displays points on the map, you have a choice of tokens/icons to use (see the OPTIONS menu). You can also display your own custom bitmap (BMP) images to mark any location on the map.
Use this command to get a list of all BMP file names listed in the OPTIONS menu. Note that by default, this list is empty.
@GET_BMP_FILE_LIST
The result will be a list of 128 file names. Blanks will be
returned where no name has been entered.
When Streets On A Disk displays points on the map, you have a choice of tokens/icons to use (see the OPTIONS menu). You can also display your own custom bitmap (BMP) images to mark any location on the map.
Use this command to change or add BMP files the list for display as tokens.
@PUT_BMP_FILE_LIST i filename
Where "i" is the index to the list position (1-128) and "filename" is the full path and name to the BMP file.
@PUT_BMP_FILE_LIST 5 c:\pictures\beagles.bmp
Given a list of latitude/longitude points (or X,Y coordinates), you can have Streets 32 automatically zoom to the correct range and center point for proper display.
NOTE: This command does not actually display the points - it only adjusts the display range. To display the points, use @GPS_LATLON, @HIGHLIGHT_POINTS, or another command.
@ZOOM_LATLONG_GROUP 34:48:51.657009 -121:15:20.426956 34:38:51.657009 -120:19:20.426955 34:28:51.657009 -121:19:20.426954 34:18:51.657009 -121:18:20.426953 34:10:51.657009 -120:17:20.426952 @END
This command is used to load the vehicle name given in the GPS menu. Once a vehicle has been selected, Streets On A Disk will automatically scroll the map if necessary to keep the vehicle visible.
@SET_GPS_TRACK_NAME Truck01
If you go to the Streets On A Disk GPS menu, you will see the item name set as requested.
Use this command to set the GPS display mode (found in the GPS menu).
Mode: 0 Multiple 1 Single with tail
@SET_GPS_MODE 0
If you go to the Streets On A Disk GPS menu, you will see the check box set as requested.
Use this menu choice is used to save a copy of the map image to an EMF file (Enhanced Metafile) for use with other programs.
@SAVE_SCREEN_IMAGE_TO_EMF_FILE c:\st32\Hello.emf
Use this command to setup the text in a legend box to be displayed on the map. The actual screen location will be the upper left hand corner unless the user manually makes an adjustment.
If the first line is blank, the legend will be cleared.
@SET_LEGEND Hello World! text line 1 text line 2 text line 3 text line 4 text line 5 text line 6 text line 7 text line 8 @END
Used to load street line data from a remote file for display on the map. See the online help file for information on the street import file format.
Mode 0: Use X,Y coordinates 1: Use latitude / longitude coordinates
Filename:
The second line of the command should contain the full path to the import file.
File Index:
The third line of the command should contain the index to the map file that will receive the data (as shown in the FILES menu). The index is a number from 1 to 12 (where 12 is the index to the GPS file).
@IMPORT_STREETS 0 c:\st32\myfile.txt 5 @OPTIMIZE_MAP 5
IMPORTANT: After importing new data, use @OPTIMIZE_MAP to complete the process. @OPTIMIZE_MAP improves search and display speed and formats boundaries to fill properly.
@OPTIMIZE_MAP improves search and display speed and formats boundaries to fill properly. Use @OPTIMIZE_MAP after importing streets/lines or new points.
The command must contain the index to the map file that needs to be optimized (as shown in the FILES menu). The index is a number from 1 to 12 (where 12 is the index to the GPS file).
@OPTIMIZE_MAP 5
This command is used to find the closest point to any coordinate on the map. For example, you could use this command to find the closest school to an address.
X,Y:
Line 2 of the command is any valid X,Y coordinate on the map. This value could be obtained using any one of several programming interface commands (example: @POINT_2_XY, @ADDRESS_XY, @LATLON_2_XY...).
File Index:
The third line of the command should contain the index to the map file to be searched (as shown in the FILES menu). The file index is a number from 1 to 12 (where 12 is the index to the GPS file). You can also enter "0" to search all files in memory.
Token Style:
The fourth line should be the style of point token to search - or blank to search all categories.
@FIND_CLOSEST_POINT_TO_XY 716544752 982470197 5 school
--> Nightingale School --> 715752201 983754212
* Point(s) not found.
This command will list all boundaries that surround any given X,Y coordinate on the map. You could use this command to find the sales territory that covers any random address.
In many cases Klynas Engineering maps include city outlines in each map files. You could use this command to detect cities or other territories.
This command will ignore water boundaries found in Klynas Engineering maps. These boundaries always start with "WB" as a name.
You will need to provide X,Y coordinates and the index to the map file to search. The file index is a number from 1 to 12 (where 12 is the index to the GPS file). You can also enter "0" to search all files in memory.
@FIND_BOUNDARIES_AROUND_POINT 716544752 982470197 5
--> Santa Maria Valley
* Boundaries not found.
This command is used to get the X,Y coordinates for any cross street on the map.
@CROSS_STREET_2_XY Maple St Main St
Maple St / Main St --> 715706593 983254589
* "..." not found. * Multiple matches for "..." * Cross street not found [ ... / ...]
This command is used to permanently erase a map file from your hard disk. Note that each Streets On A Disk map is actually a collection of six files (.mp1, .mp2, .mp3, .mp4, .mp5, and .mp6). This command will automatically erase all six files.
Always include the full pathname - but do not include an extension.
@DELETE_MAP_FILE filename
@DELETE_MAP_FILE c:\maps\ca123
This command closes all map files in use and clears the FILES menu map file list. The project file name is not affected. After this command, you will usually want to add a @DRAW_MAP command to clear the screen.
@CLEAR_MAP_FILE_LIST @DRAW_MAP 1
This command will return the coordinates for any point on the map. You will need to provide the point name and style of token (or blank line if not needed).
@POINT_2_XY point_name point_type
@POINT_2_XY Maplewood School school
--> Maplewood School --> 725619310 983412215 @END
*Multiple solutions --> *"zzz" not found.