Using the Expression Editor

The Expression Editor enables you to create simple or complex formulas (expressions) to automate the calculation of parameter values. For example, in a chosen toolpath, you can set the stepover to always be 0.5*tool diameter.

To display the Expression Editor, click View tab > Window panel > User Interface > Expression Toolbar.

Note: When you display the editor, it is initially unavailable. To enable the editor, display the appropriate dialog and click in the appropriate parameter field (the expression field turns green).

The editor features the expression field and a group of options that enable you to manage your expressions .

— Use the expression field to write expressions as well as displaying existing expressions. The name displayed on the left of the editor (circled) signifies the parameter field which you are creating the expression for.

Calculate Expression — Select to calculate the expression. Selecting the button again toggles between the expression and its value.

Undo — Select to undo last edit.

Redo — Select to redo last edit.

Accept — Select to accept the expression.

Cancel — Select to cancel recent edits and restore the expression to its prior state.

An expression can be as simple as 'tool.diameter/2' or it can be as complex as 'cos(45)*sqrt(((tool.diameter/2)^2)-(((tool.diameter/2)-tolerance)^2))*2'.

To display the list of parameters you can use to construct expressions, select:

PowerMill does not allow you to use unrelated parameters in an expression.

Expressions are not retained in parameter fields that are calculated by PowerMill's in-built expressions. For example, in a tool dialog, you can create an expression for the Length field but it is not retained if you enter a value in the Diameter field, as PowerMill updates the Length field with the in-built expression Length = Diameter*5.