These commands direct an interface to pass information to the client.
In a web service deployment, when a client connects to an interface for the first time the client should request initialization (by sending an init command to the translator). The translator will then send eim data to prepare the client for receipt of graphic data. Such preparation might be to create an atable for the receipt of symbology definitions. The client should request initialization only once in the first session, not in every session.
For single client deployment, client/server or console, the init command is unnecessary, because the translator will initialize the client automatically.
The set group command directs the translator to mark graphic primitives as belonging to a particular entity group or layer. Such later information is for client use only and has no particular use within the interface.
The set ipath command is used by some file-based translators which create Fire entity files to hold symbols. It provides a client directory where such entity files will reside.
With the exception of the init command, these commands can occur in startup scripts, in which case their settings apply to all client sessions. When the commands are used in a client session to a web service, the settings last only until the end of the session.
init {<text>}
Request that the interface initialize the client. Some interfaces can have parameters directing them to use particular initialization options. Most implementations of init have no parameters.
set group={<client_group>}
Tell the interface the "group" for fetched data. The group (or layer) will be a character string which the client will understand. Omitting the parameters will set the group to be "no group".
set ipath={<dir>}
Tell the interface a directory to use if it needs to create Fire instance (.e) files. Some interfaces use this when creating re-usable graphic symbols. <dir> is a directory on the client host.
projection {<string>}
Tell the translator the projection of fetched data. The projection will be a character string which the client will understand.
units <string>
Tell the translator the units of measure of fetched data. The units will be a character string which the eim library will understand, e.g. "mm", "m", "km" etc.
Startup Script:
# Define the base directory as the arcinfo tree cd g:/arcinfo # Turn progress messages on, and quiet mode off for all sessions set progress=on, quiet=off # Define some default symbology set fillstyle=yellow, textheight=5000 # We know the units for the ARC/Info data are meters units m # Define a default clipping region for all sessions set clip=(6250000,2050000) (6850000,2650000)
Client session 1:
# Initialize (only in the first session) init # Fetch base polygons (no meta-data) # There are no columns specified to select just the graphics select from austwater.pat # Draw the polygons with red edges set linestyle=red # Add these polygons to the land group set group=land objfetch
Client session 2:
# Fetch town points (with meta-data) select mctown-id, state from mctown.pat where population > 10000 # Provide a client class name set_classname=~arc.mctowns_t # Fetch the class definition created by the query fetch_class # Provide some statistics about the fetched data set statistics=on # Mark the towns with diamond symbols set markerstyle=mk_diamond, markerheight=10000 # Add them to the town group set group=town # Fetch the data into an array called mctowns objfetch into mctowns