Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Table of Contents

Overview

Sometimes you need to map a Block Model field that isn't coded in the original Block Model. For example, Ore and Waste definitions can be more complex and multiple grades and types inputs are required. In this case, to define different properties use Custom Variable functionality implemented through the Script Editor.

...

Scripting language is C#.

Table of Contents

Inline formula vs Custom Variable

To define different properties you can write an inline formula using “IF” statement, such as If N(“Fe”) is greater than 60 return “hg” otherwise if N(“Fe”) is greater than 58 return “mg” otherwise if N(“Fe”) is greater than 57,5 return “lg1” otherwise if N(“Fe”) is greater than 56 return “lg2” otherwise if N(“Fe”) is greater than 50 return “minw” otherwise call it “waste”.

...

Custom variables allow us to write complex logic in a readable and reusable way, which can then be mixed with other inline formulas in the block model mappings.

...

Creating Custom Variable

  1. Go to Setup > Block Model > Edit > Reservable Model Generator.

  2. Click Custom Variables to open the Script Editor.

  3. Clear all text from the Script Editor.

  4. Replace it with one of the sample codes listed below.

  5. In the list of available variables on the right you will see a new variable CustomT("Parcel") in bold, map it to the Parcel field.

...

Custom Variables Examples

...