Important Script Definitions

Most of the settings for the commands that you'll list in your scripts (and there will probably be a lot!) will be defined automatically, as you build your scripts from playlists, as described in the Overview topic. Still, there may be a few that you use frequently, we will list them here for quick reference.


See also
     Important Script Technical Information


Two-Dimensional Diagrams

Before executing any procedure that creates two-dimensional diagrams, you should specify that 2D output is desired, and define the name for the output (Rw2D graphic) file. Assigning the name in advance is recommended, otherwise, you'll get a stack of "untitled" plot windows which will then require saving manually. You can also specify that the output diagram should be displayed.

EXECUTE: 1 PROGRAM-NAME This is an example program
: (miscellaneous settings here)
:
: (this says you want to create the 2D output)

GENERAL   CREATE_2D   1
: (this says you want to save the output file)
PROGRAM-NAME   OUTPUT_2D_SAVE   1
: (this says you want to manually assign a name for the output file)
PROGRAM-NAME   OUTPUT_2D_AUTOMATIC   0
: (this defines name for the output file)
PROGRAM-NAME   OUTPUT_2D_FILE   OUTPUTFILENAME.Rw2D
: (this says you want to display the output file)
PROGRAM-NAME   OUTPUT_2D_DISPLAY   1
:
END: PROGRAM-NAME

Three-Dimensional Diagrams

Before executing any procedure that creates three-dimensional diagrams, you should specify that 3D output is desired, and define the name for the output (Rw3D graphic) file. Assigning the name in advance is recommended, otherwise, you'll get a stack of "untitled" plot windows which will then require saving manually. You can also specify that the output diagram should be displayed.

EXECUTE: 1 PROGRAM-NAME This is an example program
: (miscellaneous settings here)
:
: (this says you want to create the 3D output)

GENERAL   CREATE_3D   1
: (this says you want to save the output file)
PROGRAM-NAME   OUTPUT_3D_SAVE   1
: (this says you want to manually assign a name for the output file)
PROGRAM-NAME   OUTPUT_3D_AUTOMATIC   0
: (this defines name for the output file)
PROGRAM-NAME   OUTPUT_3D_FILE   OUTPUTFILENAME.Rw3D
: (this says you want to display the output file)
PROGRAM-NAME   OUTPUT_3D_DISPLAY   1
:
END: PROGRAM-NAME

Back to Contents


Datasheet, CSV, Text, and RTF Output

Before executing any procedure that performs computations that result in some kind of report output, you should specify what kind of output is desired, and define the name for the output file. Assigning the name in advance is recommended, otherwise, you'll get a stack of "untitled" windows which will then require saving manually. You can also specify that the output report(s) should be displayed. You can activate multiple report types. Please refer to the more detailed descriptions above for the individual settings.

EXECUTE: 1 PROGRAM-NAME This is an example program
: (miscellaneous settings here)
:
: (this says you want to create datasheet output, save the file,
: name the file manually, assign the name, and display)

PROGRAM-NAME   OUTPUT_RWDAT   1
PROGRAM-NAME   SAVE_OUTPUT_RWDAT   1
PROGRAM-NAME   OUTPUT_RWDAT_AUTOMATIC   0
PROGRAM-NAME   OUTPUT_RWDAT_FILE   OUTPUTFILENAME.RwDat
PROGRAM-NAME   OUTPUT_RWDAT_DISPLAY   1

:
: (this says you want to create CSV output,
: name the file manually, assign the name, and display)

PROGRAM-NAME   OUTPUT_CSV   1
PROGRAM-NAME   OUTPUT_CSV_AUTOMATIC   0
PROGRAM-NAME   OUTPUT_CSV_FILE   OUTPUTFILENAME.csv
PROGRAM-NAME   OUTPUT_CSV_DISPLAY   1

:
: (this says you want to create text output, save the file
: name the file manually, assign the name, and display)

PROGRAM-NAME   OUTPUT_TXT   1
PROGRAM-NAME   SAVE_OUTPUT_TXT   1
PROGRAM-NAME   OUTPUT_TXT_AUTOMATIC   0
PROGRAM-NAME   OUTPUT_TXT_FILE   OUTPUTFILENAME.txt
PROGRAM-NAME   OUTPUT_TXT_DISPLAY   1

:
: (this says you want to create RTF output,
: name the file manually, assign the name, and display)

PROGRAM-NAME   OUTPUT_RTF   1
PROGRAM-NAME   OUTPUT_RTF_AUTOMATIC   0
PROGRAM-NAME   OUTPUT_RTF_FILE   OUTPUTFILENAME.rtf
PROGRAM-NAME   OUTPUT_RTF_DISPLAY 1

:
END: PROGRAM-NAME

Back to Contents


Profile Locations

For profile diagrams, you have these options:

Example 1

EXECUTE: 1 STRATPROFILE_CMD Stratigraphy Profile
: (miscellaneous settings here)
:
: (this says that the profile location is
: NOT defined by a table)
:

PROFILE_LOC   USE_TABLE   0
:
: (these lines list the profile XY starting point
: and XY ending point)
:

PROFILE   X1   4.82026000000000E+0005
PROFILE   Y1   4.40001000000000E+0006
PROFILE   X2   4.82164000000000E+0005
PROFILE   Y2   4.39978200000000E+0006

:
: (more miscellaneous settings here)
END: STRATPROFILE_CMD

Example 2

This example names a Profile Table stored in the database under the name "SouthProfile".

EXECUTE: 1 STRATPROFILE_CMD Stratigraphy Profile
: (miscellaneous settings here)
:

PROFILE_LOC   USE_TABLE   1
PROFILE_LOC   TABLE_NAME  SouthProfile

:
: (more miscellaneous settings here)
END: STRATPROFILE_CMD

Section Locations

For cross sections, you have these options:

Example 1

This example lists the X Y coordinates for the section polyline, separated by spaces.

EXECUTE: 1 STRATSECTION_CMD Stratigraphy Section
: (miscellaneous settings here)
:
: (this says that the section location is
: NOT defined by a table)
:

SECTION_LOC   USE_TABLE   0
:
: (these lines list the section's X1 Y1 X2 Y2 X3 Y3 X4 Y4
: etc. coordinates along the section polyline, separated by spaces)
:

SECTION_LOC XY_LIST 481,880.0 4,399,874.3 481,927.2 4,399,863.5
481,971.1 4,399,853.5 482,025.2 4,399,863.5 482,078.9 4,399,879.0
482,122.8 4,399,863.5 482,170.0 4,399,838.0

:
: (more miscellaneous settings here)
END: STRATSECTION_CMD

Example 2

This example names a Section Table which defines the XY coordinates of the section's polyline points, stored in the database under the name "NorthToSouth".

EXECUTE: 1 STRATSECTION_CMD Stratigraphy Section
: (miscellaneous settings here)
:

SECTION_LOC   USE_TABLE   1
SECTION_LOC   TABLE_NAME  NorthToSouth

:
: (more miscellaneous settings here)
END: STRATSECTION_CMD

Fence Locations

For fence diagrams, you have these options:

Example 1

This example lists the X1 Y1 X2 Y2 coordinates pairs which define the fence panels in a space-delimited list.

EXECUTE: 1 STRATFENCE_CMD Stratigraphy Fence
: (miscellaneous settings here)
:
: (this says that the fence location is
: NOT defined by a table)
:

FENCE_LOC   USE_TABLE   0
:
: (these lines list the X1 Y1 X2 Y2 coordinates for each fence panel
: separated by spaces for as many panels as you want)
:

FENCE_LOC XY_LIST 481,880.0 4,399,720.0 481,880.0 4,400,020.0
481,955.0 4,399,720.0 481,955.0 4,400,020.0 482,030.0 4,399,720.0
482,030.0 4,400,020.0 482,105.0 4,399,720.0 482,105.0 4,400,020.0
482,180.0 4,399,720.0 482,180.0 4,400,020.0

:
: (more miscellaneous settings here)
END: STRATFENCE_CMD

Example 2

This example names an XY Pairs Table which defines the XY coordinates of the fence panels, stored in the database under the name "WestToEast".

EXECUTE: 1 STRATFENCE_CMD Stratigraphy Fence
: (miscellaneous settings here)
:

FENCE_LOC   USE_TABLE   1
FENCE_LOC   TABLE_NAME  WestToEast

:
: (more miscellaneous settings here)
END: STRATFENCE_CMD

Back to Contents


The Plan tools in many of the solid model menus (Lithology, I-Data, etc.) require user selection of the slice location. When you run the program normally, this is done via a pop-up program window. When you run the program via scripts, you need to use these declarations.

Define the Slice Orientation and Location

Use the MODEL_SLICE   ORIENTATION  and COORDINATE settings.  You can choose from horizontal or vertical slices. Vertical slices are limited to north-south bearing or east-west bearing; oblique slices are not available.

Example

EXECUTE: 1 LITHPLAN_CMD Lithology Plan Map
: (miscellaneous settings here)
:

MODEL_SLICE   ORIENTATION   1
MODEL_SLICE   COORDINATE   1700

:
: (more miscellaneous settings here)
END: LITHPLAN_CMD

Display the Slice Dialog

Use the MODEL_SLICE   DISPLAY_DIALOG  setting if you wish to see the interactive RockWorks slice dialog box displayed.

Example

EXECUTE: 1 LITHPLAN_CMD Lithology Plan Map
: (miscellaneous settings here)
:

MODEL_SLICE   ORIENTATION   1
MODEL_SLICE   DISPLAY_DIALOG   1

:
: (more miscellaneous settings here)
END: LITHPLAN_CMD

"True" or "1" will display the interactive dialog, "false" or "0" will not.

Back to Contents


Back to Using RockWorks Command Scripts

RockWare home page