Name
gvar — Get Geocap variables and information
Syntax
set var [gvar variable]
Description
The gvar command in the context set var [gvar variable] will transfer the Geocap variable or information of the variable into the the Tcl variable; in this case var. The gvar command is used in advanced scripting when reading internal Geocap variables or information is necessary.
Arguments
There is a long list of variables that can be attached to the gvar command as an argument.
The internal alpha variables.
The following variables are sometimes called the alpha or @ variables because one can create a list by the command lst @.
ran
xmin
xmax
ymin
ymax
zmin
zmax
xwin
xwax
ywin
ywax
zwin
zwax
posx
posy
posz
numpoint
numcell
numscalar
nrow
ncol
nlay
xinc
yinc
zinc
dispnum
rc
cellid
pointid
files
filetype
hasscalar
isgrid
volume
lookup
zsmin
zsmax
zcmin
zcmax
standev
mean
var
window
wintot
viewports
activeview
actorid
xval
yval
zval
sval
seed
median
mode
skewness
kurtosis
correlation
horizons
data
upd
cubetype
levels
area
distance
value
putnum
lc
utmzone
hemis
numlookup // number of lookup curves
numpolygon // number of polygon curves
zorigo
slope
intercept
rangelo
rangehi
newactorid
diagonal
oldx
oldy
oldz
angle
locori
Additional system variables.
datalist
hilist
hi | hiname name
gridlist
polylist // only hicore polydata names
list name
value x|y|z|s number
field
fieldnum
name | dataname" | *filename
numeric fielddata
type | datatype
data
undef
rotation
fdata | fd name
fdata | fd exist name
number variable
replaceblank string
actorid
numcom
xscreen
yscreen
dimension
scalar
numundef
Examples
The following example shows the use of gvar command.
The task is to split a dataset into cells with 3 points in each cell. It uses advanced Geocap programming.
set numpoi [gvar numpoint] ; # get number of points set n3 [expr $numpoi / 3] set pp [points x y z] ; # transfer all points to the pp variable as a list dhi data ; # delete data in workspace set i 0 for {set j 0} {$j < $n3} {incr j} { for {set k 0} {$k < 3} {incr k} { set a [lindex $pp $i] ; # get the x coordinate incr i set b [lindex $pp $i] ; # get the y coordinate incr i set c [lindex $pp $i] ; # get the z coordinate eval sta $a $b $c ; # stack the coordinates incr i } rea ter ; # read the stack mhi data app ; # append data into workspace } # The result is saved in workspace data mlo data ; # move data to active set numcel [gvar numcell] ; # get number of cells puts "Number of points: $numpoi - Number of cells: $numcel" ; # list number of points and cells