Skip to content

Scripting Language in Fields Editor

The scripting language is used in fields editor to build various expression used mainly by some AVO properties or ROI Properties.

The following scripting languages are available:

Internal scripting

Example

Returns a 3D vector initially set to the vector of M2 dataset profile named "Vector":

Block(
    Set("myvariable"; M2!Vector);
    ScalarTimes($myvariable; 2)
)

LUA scripting

Reserved keywords in LUA scripting for acZoomIn:

  • _luareturnvalue: it is used to assign return value in field expression.
  • _luacache: it is used to cache value between evaluation of field expression on each sampling of ROI.

Example 1

Returns a 3D vector by using the reserved keyword _luareturnvalue:

local myvariable = M1!Vector

_luareturnvalue = myvariable * 2

Example 2

Uses of _luacache, returning a 3D vector initially set to the vector of M2 dataset profile named "Vector":

local myvariable = M2!Vector -- Vector at sampling point of ROI

-- $ROICIIndex contains index of sampling point, starting at 0 in this example
if $ROICIIndex == 0 then
  _luacache['z'] = myvariable -- save vector at ROI sampling point of index 0
end

_luareturnvalue = _luacache['z'] * 2

See:
Scripting Language Reference