Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Unknown macro: {alias}

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

Unknown macro: {indent}

Result from random draw.

xmin

Unknown macro: {indent}

Minimum x value of active data.

xmax

Unknown macro: {indent}

Maximum x value of active data.

ymin

Unknown macro: {indent}

Minimum y value of active data.

ymax

Unknown macro: {indent}

Maximum y value of active data.

zmin

Unknown macro: {indent}

Minimum z value of active data.

zmax

Unknown macro: {indent}

Maximum z value of active data.

xwin

Unknown macro: {indent}

Minimum x of graphical window.

xwax

Unknown macro: {indent}

Maximum x of graphical window.

ywin

Unknown macro: {indent}

Minimum y of graphical window.

ywax

Unknown macro: {indent}

Maximum y of graphical window.

zwin

Unknown macro: {indent}

Minimum z of graphical window.

zwax

Unknown macro: {indent}

Maximum z of graphical window.

posx

Unknown macro: {indent}

x position of manipulator.

posy

Unknown macro: {indent}

y position of manipulator.

posz

Unknown macro: {indent}

z position of manipulator.

numpoint

Unknown macro: {indent}

Number of points in active data.

numcell

Unknown macro: {indent}

Number of cells in active data.

numscalar

Unknown macro: {indent}

Number of scalars in active data.

nrow

Unknown macro: {indent}

Number of elements in a row in active grid.

ncol

Unknown macro: {indent}

Number of elements in a column in active grid.

nlay

Unknown macro: {indent}

Number of layers in active grid.

xinc

Unknown macro: {indent}

x increment of active grid.

yinc

Unknown macro: {indent}

y increment of active grid.

zinc

Unknown macro: {indent}

z increment of active grid.

dispnum

Unknown macro: {indent}

Display list number.

rc

Unknown macro: {indent}

Return code from system: 0=error 1=OK.

cellid

Unknown macro: {indent}

Cell id from graphical cursor intersection.

pointid

Unknown macro: {indent}

Point id from graphical cursor intersection.

files

Unknown macro: {indent}

File number in get and put.

filetype

Unknown macro: {indent}

Filetype number of active data.

hasscalar

Unknown macro: {indent}

Returns 0 if active data has not scalars; 1 if has scalars.

isgrid

Unknown macro: {indent}

Return 0 if not; 1 if grid.

volume

Unknown macro: {indent}

Volume number from vol command.

lookup

Unknown macro: {indent}

Lookup value from lok command.

zsmin

Unknown macro: {indent}

Minimum z scalar value from active data.

zsmax

Unknown macro: {indent}

Maximum z scalar value from active data.

zcmin

Unknown macro: {indent}

Minimum z cell scalar value from active data.

zcmax

Unknown macro: {indent}

Maximum z cell scalar value from active data.

standev

Unknown macro: {indent}

Standard deviation from statistical calculation.

mean

Unknown macro: {indent}

Mean value from statistical calculation.

var

Unknown macro: {indent}

Free variable used by some commands.

window

Unknown macro: {indent}

Window number of active graphical window.

wintot

Unknown macro: {indent}

Total number of windows.

viewports

Unknown macro: {indent}

Total number of viewports.

activeview

Unknown macro: {indent}

Active viewport number.

actorid

Unknown macro: {indent}

Actor id of graphical display element.

xval

Unknown macro: {indent}

x curosor position.

yval

Unknown macro: {indent}

y cursor positon.

zval

Unknown macro: {indent}

z cursor position set in a 3D cube.

sval

Unknown macro: {indent}

Scalar value of cursor position.

seed

Unknown macro: {indent}

Seed value in statitical calculation.

median

Unknown macro: {indent}

Median value from statistical calculation.

mode

Unknown macro: {indent}

Mode value from statistical calculation.

skewness

Unknown macro: {indent}

Skewness value from statistical calculation.

kurtosis

Unknown macro: {indent}

Kurtosis value from statistical calculation.

correlation

Unknown macro: {indent}

Correlation value from statistical calculation.

horizons

Unknown macro: {indent}

Number of horizons read into workspace.

data

Unknown macro: {indent}

Data flag of active data: 0=error 1=OK.

upd

Unknown macro: {indent}

Up / down flag : up=1 down=-1 .

cubetype

Unknown macro: {indent}

2D or 3D cube flag.

levels

Unknown macro: {indent}

Number of contour levels.

area

Unknown macro: {indent}

Area of area calculation.

distance

Unknown macro: {indent}

Distance of distance calculation.

value

Unknown macro: {indent}

Used by various value output.

putnum

Unknown macro: {indent}

Number of files saved in put.

lc

Unknown macro: {indent}

Loop counter.

utmzone

Unknown macro: {indent}

Utm zone of active zone.

hemis

Unknown macro: {indent}

active hemisphere.

numlookup // number of lookup curves

Unknown macro: {indent}

Number of lookup curves in lookup calculation.

numpolygon // number of polygon curves

Unknown macro: {indent}

Number of polygon curves in lookup calculation.

zorigo

Unknown macro: {indent}

z origo value of image.

slope

Unknown macro: {indent}

Slope of regression curve.

intercept

Unknown macro: {indent}

Interception of regression curve.

rangelo

Unknown macro: {indent}

Low range value of 3D cube.

rangehi

Unknown macro: {indent}

High range value of 3D cube.

newactorid

Unknown macro: {indent}

New (current) actor id of graphical display element.

diagonal

Unknown macro: {indent}

Diagonal of the graphical window.

oldx

Unknown macro: {indent}

x position of previous cursor.

oldy

Unknown macro: {indent}

y position of previous cursor.

oldz

Unknown macro: {indent}

z position of previous cursor.

angle

Unknown macro: {indent}

Angle of rotated dataset.

locori

Unknown macro: {indent}

Has local origo in dataset.

Additional system variables.

datalist

Unknown macro: {indent}

List of all datasets in workspace including active.

hilist

Unknown macro: {indent}

List of all datasets in workspace not including active.

Unknown macro: {indent}

hi | hiname name

Unknown macro: {indent}

Test if name present in hicore names.

gridlist

Unknown macro: {indent}

List of only workspace grid names.

polylist // only hicore polydata names

Unknown macro: {indent}

List of only workspace polydata names.

list name

Unknown macro: {indent}

List of only workspace name data.

value x|y|z|s number

Unknown macro: {indent}

Get x,y,z or s value at number position in active data

field

Unknown macro: {indent}

Get a list of all field data.

fieldnum

Unknown macro: {indent}

Get a list of all numeric field data.

name | dataname" | *filename

Unknown macro: {indent}

Get the saved data name of active data.

numeric fielddata

Unknown macro: {indent}

Check if fielddata is numeric. 0 if not numeric, 1 if numeric.

type | datatype

Unknown macro: {indent}

Check data type of active data.

data

Unknown macro: {indent}

Check if valid data is present in active. 0 if invalid, 1 if valid

undef

Unknown macro: {indent}

Check if polydata contains undefined values.

rotation

Unknown macro: {indent}

Check if grid or cube have rotation.

fdata | fd name

Unknown macro: {indent}

Get a list of field data in name.

fdata | fd exist name

Unknown macro: {indent}

Check if field data name exists.

number variable

Unknown macro: {indent}

Check if variable is numeric. 0 if not numeric, 1 if numeric.

replaceblank string

Unknown macro: {indent}

Replace all blanks in string.

actorid

Unknown macro: {indent}

Return the actor id of the last graphic display action.

numcom

Unknown macro: {indent}

Get the number of components in active data.

xscreen

Unknown macro: {indent}

Get x size in pixels of screen.

yscreen

Unknown macro: {indent}

Get y size in pixels of screen.

dimension

Unknown macro: {indent}

Get dimension of dataset: grid or cube.

scalar

Unknown macro: {indent}

Get existence of scalars in active data. 0 if not present, 1 if present.

numundef

Unknown macro: {indent}

Get number of undefined in a grid.

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

Unknown macro: {pagebreak}
  • No labels