List of Commands |
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
See also Command Line Interface Overview.
AddTool
Use this command to place a custom button on the Think GIS menu. See also the custom button section of Workstation Settings.
Syntax:
AddTool image, text, command, hint
Where:
image File name of a small bitmap to be displayed on the button. Leave blank to use text instead. File assumed to be in same directory as tm4.exe unless specified.
text Text to be displayed on button if image file not specified.
command Any command listed here along with its parameters. Include entire command and parameters inside one set of double quotes to contain any commas included in this command.
hint Text to be displayed when user moves mouse over button.
CallDDE
Use this command to send information to another application in real time using Dynamic Data Exchange.
Syntax:
CallDDE server, topic, command, application
Where:
server Server name determined by application
topic Topic name determined by application
command Command text determined by application
application (Optional parameter) Indicates the path and file name to be used to launch this application if it is not already running. See notes on Path Variables for some important information about specifying file names.
CloseFile
Use this command to close a file previously opened with the CreateFile command.
There are no parameters for this command
CopyFile
Use this command to copy the contents of one file to another.
Syntax:
CopyFile sourcefile, destfile
Where:
sourcefile Complete path and file name of file to be copied.
destfile Complete path and file name of where the file is to be copied to. If the file already exists it will be overwritten. See notes on Path Variables for some important information about specifying file names.
CreateFile
Use this command to create and open a text file. If the file already exists it will be replaced. Use the WriteFile command to write text to the file and use CloseFile command to close the file. See also OpenFile.
Syntax:
CreateFile filename
Where:
filename Complete path and file name of file to be created. See notes on Path Variables for some important information about specifying file names.
DeleteFeatures
Use this command to delete all features on a specified layer that match a search criteria
Syntax:
DeleteFeatures layername, criteria
Where:
layername Descriptive name of any Think GIS layer.
criteria String of one or more search criteria in the format "fieldname=value, fieldname=value,..." Only those features matching all the criteria area deleted. In addition to the equals sign (=), users can also use contains (ex. Name~bob), greater than or less than (ex. Size>500), or not equal to (ex. Age<>0).
Example:
DeleteFeatures addresses, Street=Main St, House>500, Community<>Bigtown, Name~Smith
DrawAcre
This is a special purpose command used to plot a one acre sized rectangle on the map. Designed for use with the parcel assessment wizard, this command displays a rectangle next to the mouse and prompts the user to position it on the map. When the left mouse button is clicked an Area entity is added to the map at that location associated with the Current Feature and Current Layer indicated in the Editing Toolbar. While positioning the box the user can use the arrow and PgUp/PgDn keys to rotate and/or change the aspect ratio of the box while maintaining a size of one acre. As with the normal Draw Area tool, a prompt to remove any overlapping areas will pop up.
This is a special purpose command used to plot a 0.125 acre sized rectangle on the map. Designed for use with the parcel assessment wizard, this command displays a rectangle next to the mouse and prompts the user to position it on the map. When the left mouse button is clicked an Area entity is added to the map at that location associated with the Current Feature and Current Layer indicated in the Editing Toolbar. While positioning the box the user can use the arrow and PgUp/PgDn keys to rotate and/or change the aspect ratio of the box while maintaining a size of 0.125 acre. As with the normal Draw Area tool, a prompt to remove any overlapping areas will pop up.
DumpAVL
This command creates and displays a text file with diagnostic information about the current state of all connections to AVL and Event servers.
EnableAVL
Use this command to turn to various AVL sources on and off.
Syntax:
EnableAVL name=state, name=state, name=state
Where:
name is the descriptive name of an AVL source such as "CPD AVL SERVER"
state is ON or OFF
Example1:
EnableAVL cpd avl server=off,cpd cfs server=on
To turn groups on and off use this syntax
EnableAVL name:group=state
Example2:
EnableAVL cpd avl server=on,cpd avl server:police=on,cpd avl server:fire=off
Use an asterisk (*) as the group name to turn all groups on or off. Example:
EnableAVL cpd avl server:*=on
To simply turn all sources and all groups on use the syntax
EnableAVL ON
To turn all sources off use
EnableAVL OFF
To toggle all sources between on and off use
EnableAVL TOGGLE
To manually control AVL states see AVL Setup screen.
EnableGPS
Use this command to turn to GPS on and off.
Syntax:
EnableGPS Enabled,FollowMe
Where:
Enabled=ON, OFF, or TOGGLE
FollowMe=ON or OFF (optional and only meaningful when Enabled=ON)
Examples
"EnableGPS ON" (enables the GPS connection)
"EnableGPS OFF" (disables the GPS connection)
"EnableGPS TOGGLE" (enables if previously disabled or disables if previously enabled)
"EnableGPS ON,ON" (enables GPS and sets follow-me to on)
"EnableGPS ON,OFF" (enables GPS and sets follow-me to off)
EraseLayer
Use this command to erase all the entities and features form a layer.
Syntax:
EraseLayer layername
Where:
layername Descriptive name of any layer.
Exit
Use this command to shut down Think GIS
There are no parameters for this command.
Use this tool to export the GIS data displayed in the Info Window. The file will use tab separations between field name and field data. This function may be used to immediately provide currently viewed GIS data to third-party software via the generated text file.
Syntax:
ExportInfoWindowText file
Where:
file Name of the file to be saved and the path if set. Defaults to directory where Think GIS (tm4.exe/tm4viewer.exe) is running from.
Examples:
ExportInfoWindowText infowindow.txt (Places the file in the Think GIS folder)
ExportInfoWindowText reports/infowindow.txt (Places the file in the thinkgis/reports folder)
ExportInfoWindowText c:/temp/infowindow.txt (Places the file in the c:/temp folder)
Find
Use this command to locate and zoom to a specific location on the map.
Syntax:
Find location
Where:
location Any address, feature name, or intersection. Location text uses same syntax as Search Box.
FindXY
Use this command to zoom to a longitude/latitude coordinate and label it.
Syntax:
FindXY long, lat, text
Where:
long Longitude coordinate expressed in decimal degrees (ex. -87.1234560).
lat Latitude coordinate expressed in decimal degrees (ex 39.1234560)
text Optional text used to label point on the map.
FindAddress
Use this command to zoom to and highlight an address.
Syntax: (any of the following)
FindAddress house, dir, street, city
FindAddress house, dir, street
FindAddress address, city
FindAddress address
Where:
house The house number for this address.
dir The pre-direction for this address. If none or unknown leave blank.
street Street name for this address.
city Community name or zip code depending on how addresses are stored on map.
address Unparsed address string (ex. "123 N Main St").
FindFeature
Use this command to zoom to and highlight a certain feature.
Syntax:
FindFeature layername, fieldvalue1, fieldvalue2, ...
Where:
layername Descriptive name of any layer.
fieldvalues To find a matching feature, provide the value of each of the key fields for this layer. Most simple layers have only one key field while some may have 7 or more fields required to uniquely identify a feature.
FindFeatures
Use this command to zoom to and highlight a list of features.
Syntax:
FindFeatures layer name, file name
Where:
layername Descriptive name of any layer.
filename Path and file name of a list of features. Each line of this text file is formatted as "fieldvalue1, fieldvalue2,..." similar to the FindFeature command above.
FindIntersection
Use this command to zoom the intersection of two features.
Syntax:
FindIntersection street1, street2
Where:
street1 Name of first street or other type of feature. These values are compared to the first field of every layer to find a matching feature.
street2 Name of second street.
ImportCSV
Syntax
ImportCSV csvFileName,layerName,option
Where
§ csvFileName = path and file name to a comma delimited text file
§ layerName = descriptive name of layer to be created
§ options: any combination of the following
"/F" first row contains field names
"/L=n" geocode per single location field where n is the zero based field number
o location field can contain:
§ -address (i.e. "123 N Main St, city" quotes required if comma in field
§ -intersection (i.e. "Main St/Walnut St")
§ -place name (i.e. "Walmart")
§ -lat/lon (i.e. "x:-87.1234567 y:40.1234567")
"/H=n" house number field index. Zero based. (used in combination with H,D,S,Z)
"/D=n" pre direction field index
"/S=n" street name field index. Any street name suffix or post direction fields should be included in this field.
"/Z=n" zip code or community name field index
"/R" replace existing layer if exists. If /R is not included and layer exists then layer is given different name
"/X=n" longitude field index
"/Y=n" latitude field index
"/order=n" use this to specify the new layer's position in the layer list. If no order is specified then the layer is added at the end of the list and therefore drawn on top of all other layers.
"/line=c" line color to be assigned to layer where c is any common color name
"/fill=c" fill color
"/sym=name". See SetSymbol command for list of common symbol names
"/zoom" instructs Think GIS to zoom in on imported points when finished.
"/linkname='name' " defines the name portion of a hyperlink to be associated with each incident on the layer. Single quotes are required. See Link example below.
"/linkcmd='path' " defines a command line or url to execute when the hyperlink is clicked. Single quotes are required. See link example below.
Example:
ImportCSV c:\cad\export.csv, January Burglaries,/F /L=3 /line=black /fill=yellow /sym=s4
Links:
The linkname and linkcmd parameters above are used in combination to create a "Global Link" for the new layer. A global link is a hyperlink that appears anytime the user clicks on one of the incidents in the layer being created. There is just one common link path defined for all features on this layer. Including variables in the path that reference field values in the individual records will make the link behave differently for each feature. The following two examples show how to do this:
Link Example 1:
In this example, the text <IncidentNum> would get replaced with the value of the IncidentNum field for the current record before executing the link.
ImportCSV data.csv,Last Week,/F /L=0 /R /linkname='details' /linkcmd='http://server/record.aspx?id=<IncidentNum>'
Link Example 2:
In this example,include a field in the csv file named "path". Each record in the file would include the full path to be executed for that record.
ImportCSV data.csv,Last Week,/F /L=0 /R /linkname='more…' /linkcmd='<path>'
Notes:
•Only one method of geocoding can be used. Choices are "/L", "/H/D/S/Z", or "/X/Y"
•Errors are logged to session.log file
Heat maps are created using "/sym=h". To control the appearance of the heat map, specify a radius after the "h". positive numbers indicate ft, negative numbers indicate pixels.
Refer to the "setCC" command for assigning different colors to different imported records based on a field value
•To use different symbols for different points use the command" setSymbolCls"
ImportDXFFileUsing
Use this command to do complex imports of DXF files. When dxf files are manually imported using Import DXF, there are sometimes many questions asked by Think GIS in order to determine where and how everything should be imported. This command allows users to define all the import rules in a text file and then execute this command multiple times for multiple, but similar, dxf files.
Syntax:
ImportDxfFileUsing dxfFileName, SetupFileName
Where:
dxfFileName The path and file name to a .dxf file. See notes on Path Variables for some important information about specifying file names.
SetupFileName The path and file name to a text file defining the complex rules used to import the dxf file. The contents of an example setup file are shown below. The setup section defines the coordinate system used by the dxf file where Projection can be any line from the projections.tmd file or "local". Use the layer table to list several entries of the format DXF Layer Name=Think GIS Layer Name.
[Setup]
Projection=local
Units=Feet
[Layer Table]
6=Layer6
10=Layer10
32=Layer32
11=Layer11
44=Layer44
4=Layer4
ImportShapeFile
Use this command to import an ESRI shapefile. This command can optionally be proceeded by a SetRedirection command used to specify which fields get imported. If no SetRedirection command comes before the ImportShapeFile command then all fields are imported. The optional SetRecordFilter command can also precede this command to limit the records that are imported.
Syntax:
ImportShapeFile filename, layername, combine, projection, units
Where:
filename Path and file name of a .shp file (.dbf file assumed to exist in same location). See notes on Path Variables for some important information about specifying file names.
layername The name of the layer where this information will be imported to
combine Indicates if matching features should be consolidated into the same feature. "true" or "false"
projection Projection name exactly matching the first parameter of one of the entries in the projections.tmd file
units Units of measurement used by this file. "ft" or "m"
Index
Use this command to display the index window with a certain layer already selected.
Syntax:
Index layername
Where:
layername Descriptive name of any layer.
IsolationTool
Use this command to launch the Flow Isolation tool with a preconfigured setup.
Syntax:
IsolationTool configFile
Where:
configFile is the name of a config file previously saved using the "Save Setup" link on the Flow Isolation Tool setup screen.
ListNearbyFeatures
Use this command to automate the List Features within distance of another Feature tool. This command is designed to be called from a custom button or function key to eliminate a few steps of the manual version of this tool. The results of this tool is the display of a list of all features that exist within a given distance of a base feature.
Syntax:
ListNearbyFeatures baseLayerName, searchLayerName, distance, baseFtrName
Where:
baseLayerName: The user will be prompted to select a base feature from this layer. This parameter is ignored when a baseFtrName is provided.
searchLayerName: the layer to be searched,
distance: the default search distance.
baseFtrName (optional): Can be any feature name, address, or one of the key words "GPS" or "LOOKUP". GPS indicates that the vehicles current position, as indicated by the attached GPS, is to be used as the base feature location. LOOKUP indicates that the center of the last map lookup is to be used as the base feature location.
ListNearestFeatures
Displays a list of features that are nearest to a specified location. List is sorted by distance
Syntax:
ListNearestFeatures Location, LayerName, Count, MaxDist
Where
Location: any address, intersection, place name, or one of the following variables
LOOKUP =center of last map lookup,
VIEW = center of current view,
GPS = current GPS location, or
PICK = user is prompted to pick location
LayerName: the name of the layer to be searched or "AVL" to search for nearest AVL units
Count: the maximum number of features to be displayed
MaxDist:maximum distance in feet to be considered
Example:
ListNearestFeatures Lookup,Fire Hydrants,3,10000
MarkWaypoint
This command automates the Mark Waypoint menu command by allowing users to specify a default point selection mode.
Syntax:
MarkWaypoint action
Where:
action 0=GPS location is default
1=Pick point is default
Example:
MarkWaypoint 1
MaxView
Use this command to zoom to a view of the entire map or the view specified as the "Max View" in the Map Settings screen.
There are no parameters for this command
ModifyMenuItem
Use this command to hide, show, or rename a menu item
Syntax:
ModifyMenuItem item, action, newtext
Where:
item The menu item text. To specify a button see Button Names.
action 1= hide this menu item
2= show this menu item
3= rename this menu item
newtext New text to be assigned if action=3
Use this command to run the New Feature + Symbol, New Feature + Label, or New Feature + Rename menu items using a certain set of parameters. These tools will function as if selected from the menu, except there will be no prompt for a layer or other parameters since they are included in the command parameters.
Syntax:
NewFeatureWizard action, layername, existaction
Where:
action is Symbol, Label, Rename, or Address.
layername is the name of any locked layer.
existaction specifies what to do if the new feature already exists:
0 = Add it anyway.
1 = Prompt.
2 = Use existing feature
OpenFile
Use this command to open a file for writing. If the file already exists its contents will be appended to. Otherwise the file is created. Use the WriteFile command to write text to the file and use CloseFile command to close the file. See also CreateFile.
Syntax:
OpenFile filename
Where:
filename Complete path and filename of file to be opened. See notes on Path Variables for some important information about specifying file names.
OpenMap
Use this command to open a map file.
Syntax:
OpenMap mapname
Where:
mapname path and file name of a .tgm file.
See notes on Path Variables for some important information about specifying file names.
OpenSideMap
Use this command open a side map window.
Syntax:
OpenSideMap lon,lat,span,caption,left,top,width,height
Where:
lon longitude coordinate marking the center of the place on the map to view in the side map window
lat latitude coordinate of center.
span width of viewing area in miles. For example 0.5 means that the side map will view an area that is approximately 0.5 miles across.
caption text to be displayed in title bar of side map window. Useful when multiple side maps are open.
left screen pixel location of left edge of side map window. Leave out the last four parameters and Think GIS will select a default window size and location
top screen pixel location of top edge of side map window.
width width of side map in pixels. maximum width and height is 400
height height of side map in pixels
Example:
OpenSideMap -74.047,40.887,0.2,Headquarters
OpenSideMap -74.047,40.887,3.0,Cedar Twp,800,50,300,300
ParseAddresses
Use this command to parse an address string, stored completely in the street field, into its separate fields for every feature on a specified layer. This is typically used after importing addresses from an unparsed source. The information is first imported into the street field and then this command is ran to separate each field into its correct place.
Syntax:
ParseAddresses layername,flags
Where:
layername Descriptive name of an address layer. If no layername is specified then Think GIS parses the first address layer in the map.
flags 0 = default address parsing rules
1 = don't abbreviate house suffixes. For example, "123 Apt 12 N Maple St" would be parsed hse =123, Sfx=Apt 12, Dir=N, Str=Maple St with this option turned on. When turned off the address would be parsed as Hse=123, Sfx=12, Dir=N, Str=Maple St.
PickPoint
Use this command to prompt user to select a point on the map. The coordinates of the point they pick are stored into the variables named "%Lat%" and "%Lon%" which can be used as input into subsequent commands.
Syntax:
PickPoint Instructions
Where:
Instructions Text to be displayed at bottom of the screen while picking point.
PickRun
This command is designed to be used in a global link where there are multiple documents to link to. This command displays a pick list of documents and then runs the document that the user selects. The documents listed are specified through a filter containing wild card characters.
Syntax:
PickRun filter, title, instructions
Where:
filter: a path and file name with wild cards.
For example "%MapDir%\Hazmat\<LocationID>-*.jpg" would display a list off all jpg photos with a prefix matching the LocationID field of the current feature
title: the text displayed in the title bar of the popup pick list
instructions: the instructions displayed in the popup pick list.
see "using variables in commands" in Command Line Interface topic for meaning of %MapDir% and <LocationID>
Popup
Use this command to display a popup message and wait for the user to click OK before continuing.
Syntax:
Popup message
Where:
message Text to be displayed in popup message box.
Use this command to print an already existing layout.
Syntax:
Print layoutName
Where:
layoutName The name of a previously saved print layout file.
PurgeLayer
Use this command to execute the purge menu item using the specified layer name.
Syntax:
PurgeLayer layername
Where:
layername Descriptive name of any layer.
Redraw
Use this command to refresh the current view. This command does not erase highlighting or construction lines like the Redraw menu item does. There are no parameters for this command.
Refresh
Use this command to reload the layers in the currently open map. Refresh only reloads layers that are not locked for editing. This allows users to update the display with any changes made to a layer since opening the map. There are no parameters for this command.
Run
Use this command to execute a separate program or document.
Syntax:
Run filename
Where:
filename Path and file name of an executable file including any command line parameters. This can also be simply the name of a document if the system has an application associated with the documents extension. See notes on Path Variables for some important information about specifying file names.
RunWait
Identical to the Run command above except that this command waits until the specified application has terminated before continuing with the next command. See Run command above for syntax.
RunMenuItem
Use this command to simulate clicking a menu item.
Syntax:
RunMenuItem item
Where:
item Text matching the menu item to be run. To simulate clicking a button enter the Button Name here.
RunScript
Use this command to run a set of commands contained in a text file. Each line of the text file should be a command. Each command can be up to 512 characters long. There are a few places within Think GIS that make use of a Script Editor screen that automates the process of creating a script.
Syntax:
RunScript filename, section
Where:
filename Path and filename of script.
section (Optional) name of section in the above file to run. If no section is specified commands are executed from the top of the file until the end of the file is reached or the start of another section is found. Sections are indicated in a script file by a section name enclosed in square brackets. See notes on Path Variables for some important information about specifying file names.
SaveLayer
Use this command to save the contents of a layer to disk.
Syntax:
SaveLayer layername
Where:
layername Descriptive name of a layer.
SaveLayer *
By adding a space and asterisk at the end of the alpha characters, this command will save the settings for all layers that are locked for editing when executed.
Syntax:
SaveLayer *
SearchForm
Use this command to display the search window for a specified layer.
Syntax:
SearchForm layername
Where:
layername Descriptive name of a layer
SetAtt
Use this command to set a display attribute for a layer. This command has been made somewhat obsolete by the SetAtts command but is simpler to use when changing a single setting.
Syntax:
SetAtt layername, attribute, value
Where:
layername Descriptive name of a layer. Specify "all" to set this attribute for all layers.
attribute name of attribute such as "Visibility"
value Value to assign to this attribute such as "on" or "off", or "1.5"
Can be used with the following attributes
Attribute Values
Visibility on, off, number of miles
scatter 0=normal symbol placement, 1=offset colocated symbols.
HeatLegend 0=off, 1=on
SetAtts
Use this command to set the display attributes for a layer.
Syntax:
SetAtts layername, visibility, line color, text color, fill color, line style, line width, flags, autolabel visibility, autolabel size, textStyle, textShadowType, textShadowColor, opacity, fillType, fillColor, hatchWidth, hatchAngle1, hatchAngle2,
Where:
layername Descriptive name of any layer. Specify "all" to set these attributes for all layers.
visibility "on", "off", or number of miles visible at.
line color Any numeric color value or a common color name such as red, blue, etc. Classifications are automatically turned off whenever the SetAtts command is used. To turn it back on follow this command with a SetCC command.
text color Any numeric color value or a common color name such as red, blue, etc.
fill color Any numeric color value or a common color name such as red, blue, etc. A value of -1 indicates "do not fill". Classifications are automatically turned off whenever the SetAtts command is used. To turn it back on follow this command with a SetCC command.
line style 0=solid line, 1=dashed, 2=dotted, 3=dash-dot, 4=dash-dot-dot, 5=hashed, 6=arrows
line width Positive values are screen pixel widths, negative values are widths in feet.
flags 12=selectable, 8=not selectable.
autolabel visibility "on", "off", or number of miles visible at.
autolabel size Screen pixel height of auto labels
textStyle The sum of any of the following: 1=bold, 2=underline, 4=itatlic, 8=hideOverlappingLabels
textShadowType 0=none, 1=shadow
textShadowColor numeric color value or common color name
opacity 0 to 255 where 0=transparent and 255=solid color
fillType 0=no fill, 1=color, 2=hatch
fillColor numeric color value or common color name. applies only when fillType=1. Overrides old "fill color" parameter described above.
hatchWidth positive number indicates pixel distance between hatch lines, negative=feet
hatchAngle1 angle of first set of hatch lines in degrees
hatchAngle2 angle of second set of hatch lines in degrees or -1 if none.
SetCC
Use this command to setup line color classification
Syntax:
SetCC layername, method, fieldname, value=color, value=color, ...
Where:
layername Descriptive name of any layer.
method 0=color coding off,
1=assign unique color to each field value.
2=assign unique color to ranges of values
fieldname The field of this layer whose values are used to determine color
value Any field value matching one or more features on this layer. Or a range of numeric values in the format "low-high"
color Any numeric color value or a common color name such as red, blue, etc.
To assign a random color to each unique value in the layer, do not list any value=color definitions. See also SetFillCls, SetLineWidthCls, SetLineStyleCls, and SetTextColorCls.
SetErrorLevel
Use this command to control how Think GIS reacts to errors encountered during scripts. Error level is not used by all commands.
Syntax:
SetErrorLevel level
Where:
level 1=Stop script on error (only applicable within a script),
2=report errors and warnings,
3=both of the above.
SetFieldValue
Use this command to globally set the value of a specified field for one or more features in a layer.
Syntax:
SetFieldValue layername, feature, fieldname, value
Where:
layername Descriptive name of a layer. Use "all" to apply this command to all layers.
feature "all" = apply to all features on this layer
Or specify a filter here to control which features this command is ran on. To do this enter a string of one or more search criteria in the format "fieldname=value, fieldname=value,..." Only those features matching all the criteria are considered. In addition to the equals sign (=), users can also use contains (ex. Name~bob), greater than or less than (ex. Size>500), or not equal to (ex. Age<>0).
fieldname Name of a field in this layer
value Text value to be assigned to this fields.
SetFillCls
Use this command to classify the fill style for a layer.
Syntax:
SetFillCls layername, method, field, value=style, value=style, value=style, ...
Where:
layername Descriptive name of layer.
method 0=fill classification off,
1=assign a style to each unique field value.
2=assign a style to each range of values
3=use same color as line color.
fieldname The field of this layer whose values are used to determine style
value A field value
style If this layer's fill type is color then this parameter is a numeric color value or a common color name. If this layer's fill type is hatch then this parameter uses the format
wWaAbB
where:
W=hatch witdh. positive numbers indicate pixel width, negative numbers represent feet.
A=angle of first hatch pattern in degrees
B=angle of second hatch pattern in degrees. -1=not used.
example:
"w6a45b-1"
SetLayer
Use this command to set, or prompt for, the Current Layer in the edit toolbar.
Syntax:
SetLayer layername
Where:
layername Descriptive name of layer. Leave this parameter blank and Think GIS will prompt the user for a layer.
SetLineWidthCls
Use this command to classify the line width of a layer.
Syntax:
SetLineWidthCls layername, method, field, value=width, value=width, value=width, ...
Where:
layername Descriptive name of layer.
method 0=line width classification off,
1=assign a width to each unique field value.
2=assign a width to each range of values
fieldname The field of this layer whose values are used to determine width
value A field value
width positive values indicate pixel width. negative values indicate feet.
SetLineStyleCls
Use this command to classify the line style of a layer.
Syntax:
SetLineStyleCls layername, method, field, value=style, value=style, value=style, ...
Where:
layername Descriptive name of layer.
method 0=line style classification off,
1=assign a style to each unique field value.
2=assign a style to each range of values
fieldname The field of this layer whose values are used to determine style
value A field value
style line style string. String can be any custom line style or for common styles use format "#N" where N is 0-7.
SetFeature
Use this command to set the Current Feature in the edit toolbar
Syntax:
SetFeature layername, fieldvalue1, fieldvalue2, ...
Where:
layername Descriptive name of any layer.
fieldvalues To find a matching feature, provide the value of each of the key fields for this layer. Most simple layers have only one key field while some may have 7 or more fields required to uniquely identify a feature.
SetLocks
Use this command to lock or unlock a layer for editing.
Syntax:
SetLocks layername=value:password, layername=value:password, ...
Where:
layername Descriptive name of a layer.
value true or false
password provide a password here if one is assigned. If a layer has a password and it is not provided here, the user will be prompted for a password.
SetRecordFilter
Use this command to limit a shapefile import to only certain records. This command is typically ran just before an import command in a script. Using this command allows user to instruct the import process to only import shapefile records that have the specified value(s) in the specified srcfield(s).
Syntax:
SetRecordFilter srcfield=value, srcfield=value, ...
Where:
srcfield Name of field in shapefile
value value that must exactly match the contents of the source field in order for the record to be imported.
SetRedirection
Use this command to specify how fields get copied from a source format to a destination format. This command is typically ran just before an import command. Some import routines support mapping multiple source fields to the same destination field in which case the fields are concatenated together.
Syntax:
SetRedirection destfield=srcfield, destfield=srcfield, ...
Where:
destfield Name of field in destination location.
srcfield Name of field in source location.
SetSymbol
use this command to change the symbol associated with a layer.
Syntax:
SetSymbol layername, symbolname
Where
layername Descriptive name of layer.
symbolname a two character identifier of the form "tr" where t is one of the following symbol types:
§ 's'=square
§ 'c'=circle
§ 't'=triangle
§ 'd'=diamond
§ 'h'=heat map
§ '*'=star
And r is the size of the symbol's radius in pixels (half of its overall width). For symbol type 'h' a positive number indicates feet and negative numbers indicate pixels. For all other symbol types use a positive number only which is pixels.
Example
SetSymbol 2010 Burglaries,h-6
SetSymbol Fire Hydrants,d5
SetSymbolCls
Use this command to classify the symbols for a layer. Classification is the process of assigning different display attributes to different features.
Syntax:
SetSymbolCls layername, method, fieldname, value=symbol,value=symbol, ...
Where:
layername Descriptive name of layer.
method 0=symbol classification off,
1=assign a symbol to each unique field value.
2=assign a symbol to each range of values
fieldname The field of this layer whose values are used to determine the symbol
value A field value
symbol bmp file name or common symbol name. file name paths are assumed to be relative to Think GIS directory. Bmp files must conform to bmp symbol requirements. Or see SetSymbol command for a list of common symbol names such as "c5" for a 5 pixel circle.
Example:
SetSymbolCls March Crime,1,crime type,burglary=cmicons\burg.bmp,arson=cmicons\arson.bmp
Notes:
•Any features with a field value not found in the list will be assigned the default symbol for this layer.
SetTextColorCls
Use this command to classify the text color of a layer.
Syntax:
SetTextColorCls layername, method, field, value=color, value=color, value=color, ...
Where:
layername Descriptive name of layer.
method 0=text color classification off,
1=assign a color to each unique field value.
2=assign a color to each range of values
fieldname The field of this layer whose values are used to determine color
value A field value
color A numeric color value or common color name
This command allows the user to display the auto area search results, normally shown on the left-hand side after a search, by executing the command and then left clicking on the map. There are no parameters for this command.
ShowMenu2
Use this command to display a popup menu. Unlike the ShowMenu command, the ShowMenu2 command lets users build more complex floating menus by referencing a menu file rather than putting everything in the command line parameters. The Floating Menu Editor automates the creation of floating menus and the assembly of this command. See the Menu tab of Workstation Settings.
Syntax:
ShowMenu2 menuFile, sectionName
Where:
menuFile is the path and file name of the file containing the menu contents (*.tfm).
sectionName is the name of the section within the menu file that defines the menu.
ShowMenu
Use this command to display a popup menu. In the parameters to this command, users specify the text of each menu item and the command to execute when that item is selected.
Syntax:
ShowMenu x,y,text1,"cmd1",text2,"cmd2",...
Where:
x,y is the location of the top left corner of the menu in coordinates relative to the map window. If using a custom button to call this command then set x,y to 0,0 and the menu will be displayed just below the button.
text is the text to be displayed on each row of the menu and cmd is the Think GIS command to run when the menu item is clicked. Up to 20 menu items on a single menu may be included.
Examples:
The following Examples display a menu that allows users to apply various avl filtering rules. So it serves as an example of the EnableAVL command also. Because the ShowMenu command contains parameters that are commands themselves and those commands within the command have parameters of their own it can be a little tricky to follow the syntax and the use of double quotes is very important. These examples assume that there are two avl sources with the following groups:
Source1 Name = AVL
Source 1 Groups = Unassigned, Available, DP, P1, P2, P3, P4, P5, P6, P7, P8, P9
Source 2 Name = CFS
Source 2 Groups = User Events, P1,P2,P3,P4,P1 UA,P2 UA,P3 UA,P4 UA
Simple Example 1:
This example displays a menu with 2 items. First item turns avl on, second item turns avl off.
ShowMenu 0,0,Vehicles On,"EnableAVL avl=On",Vehicles Off,"EnableAVL avl=OFF
Complex Example 2:
This example displays 2 menu items. The first one turns off all vehicles except for those that are available for emergency assignment. For this example let's say that includes any cars that are "Available", "DP", "P8", or "P9". The second menu items turns all avl groups back on. Both menu items also assure that the avl source as a whole is enabled. This example also demonstrates the use of the asterisk. "avl:*" means "all groups of the avl source"
ShowMenu 0,0,Available Units,"EnableAVL avl=on,avl:*=off,avl:available=on,avl:dp=on,avl:p8=on,avl:p9=on" , All Units,"EnableAVL avl=on,avl:*=on"
This command is designed to be called from a custom button or function key to allow a location to be selected in Think GIS to open the Nearmap customer website. If the user is logged in to Nearmap, it will automatically show the Panorama view for the selected location using the defined parameters.
Syntax:
ShowNearmapPanorama layername,ZoomLevel,Orientation
Where:
layername: Descriptive name of any Think GIS layer.
ZoomLevel: Zoom level between 8-22. Higher zoom levels are recommended to show location detail.
Orientation: N,S,E or W. Default orientation when location opens in Nearmap.
Example:
ShowNearmapPanorama Nearmap Aerials,21,N
WriteFile
Use this command to write text to a file. Use the CreateFile command to first create and open a file before writing to it.
Syntax:
WriteFile text
Where:
text A line of text to be appended to the file. Field name variables can also be included here so that the text is specific to a certain feature.
WriteUdp
Use this command to send a udp packet to another application across the network.
Syntax:
WriteUdp address,port,text
Where:
address IP address where packet will be sent to.
port TCP/IP port number to be used.
text Text to be sent. No formatting or header is added.
ZoomTo
Use this command to specify an area of the map to zoom to.
Syntax:
ZoomTo xmin, ymin, xmax, ymax
Where:
xmin Think GIS coordinate of left edge of view
ymin top edge of view
xmax right edge of view
ymax bottom edge of view
Copyright © 2024 WTH Technology |