PowerMill Functions

PowerMill provides a library of functions. Click Help > Documentation > Parameters > Reference to view them listed under Functions in the Parameter Reference list.

You can use functions in most fields in PowerMill.

We recommend that functions are used only by advanced users of PowerMill with programming experience.

Function example

The SELECT function returns one value if a condition you specify evaluates to true, and another value if that condition evaluates to false.

The general syntax of the SELECT function is:

select(logical_test; value_if_true; value_if_false)

The SELECT function syntax has the following arguments:

Arguments can be expressions. Each argument must be separated by a ; character. Any enumerator or string must be enclosed in single quotes, for example 'tip_radiused'.

Creating an expression using functions

The following expression calculates a stepover value by evaluating the Tool.Type parameter:

select(Tool.Type=='tip_radiused'; Tool.TipRadius*0.6; Tool.Diameter*0.3)

When the tool is:

The Parameter Summary list (available from Help > Documentation > Parameters > Summary) contains a list of all the parameters that you can use to construct expressions.

The Parameter Reference list (available from Help > Documentation > Parameters > Reference) contains a list of all the parameters and parameter values that you can use to construct expressions.