...
...
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
Go to Setup > Block Model > Edit > Reservable Model Generator.
Click Custom Variables to open the Script Editor.
Clear all text from the Script Editor.
Replace it with one of the sample codes listed below.
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
...