Unknown macro: {alias}
Name
gvar — Get Geocap variables and status
Syntax
set var [gvar variable]
Description
The gvar command in the context set var [gvar variable] will transfer the Geocap variable or status 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 status is necessary.
Arguments
There is a long list of variables that can be attached to the gvar command as an argument.
Examples
The following example show 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
Unknown macro: {pagebreak}