Applying a Maths Script
Blocks can be modified by performing mathematical operations on them using Evolution's Maths Script tool.
To apply a maths script on a block model:
-
Right-click the model in the Project Explorer and select the Add new maths script option. A
- A script will be created in the Project Explorer under the block model. Double click this object to open the Maths Script window in the Viewer.
-
Write a script.
-
Existing properties of the model can be read by typing "block" followed by a full stop.
-
Existing properties of the model can be modified by typing in the attribute name on the left, followed by an expression on the right.
existingAttribute = block.X + block.Y
-
Temporary attributes which will not be written to the model and only used within the script can be created by wrapping the expression on the right-hand side inside a define function.
tempAttribute = define(block.X + block.Y)
-
- Click Run formula.
- Check that the new attribute has been calculated correctly by opening the block model in the Viewer and checking its properties.