Edit Script

Edit or Create a Script

Use the Edit Script option to edit or create a script file using a Workbench Text Editor. The script file (<proj><name>.bcf) contains a list of conditions/expressions and is used by the Execute Script option.

The Execute Script option applies the conditions and expressions to each block in the open block model.

A list of available operators/functions is provided in Appendix B of the Vulcan Core documentation. Appendix E gives you information on the format of a script file plus any commands that can be used in the file. It also provides a method for using the real world coordinates for the values of the Xcentre, Ycentre and Zcentre variables in a block model. By default, these values are stored relative to the block's origin and consequently are treated as offsets. Appendix A of the Block documentation provides examples of script files.

This option can also be used to create or edit a script file for use by the Transform > Perform Addition option. The Perform Addition option combines two block models based on a block model definition file and a variable constraining file ( <proj><variable>.bcf ). As only simple conditions/expressions are added to the file when using the Perform Addition option, use the Edit Script option for more complex conditions.


Instructions

On the Block menu, point to Manipulation, and then click Edit Script.

All block model scripts (extension.bcf) in the working directory are displayed. To edit an existing script, select the script from the list, or navigate to another directory to select a script from another directory. To create a new script, enter the name in the File name box. (The extension is added automatically.)

Click Open.

If you are creating a new script, the text editor will prompt you to confirm that you want to create a new file. Click Yes to create the new file.

The script is then opened in your default Workbench Text Editor.

The script can be edited and saved (thus overwriting the original file) or saved as a new file. Close the window when you have finished editing the file.


Manipulation > Execute Script option

All variables in the block model are available for use in conditions using their variable names. If a NUMERIC variable is used in a condition but does not exist in the block model, a temporary variable is generated during script calculation. This temporary variable is not retained. If a NAME variable is used and no translation table exists, the table is built with the variable and appropriate values. If a translation table does exist, but the specific values don't, then these are added. In the example below, the values "waste" and "ore" would be added if they did not exist.

Example - Name Variables/Translation Tables

if (geology eqs "tq1") then

oretag - "waste"

else

oretag = "ore"

endif


Transfer > Perform Addition option

Variables must be preceded by <bfi>: For example <bfi>:<var>. The following constants should be used to represent variables in areas of the input block models that don't have blocks:

Variable

Constant

Numeric

-9999999999.0

Name

"-9999999999"