You can use conditional expressions so if PowerMill cannot resolve a parameter, the setup-sheet field is not blank but displays a pre-defined, meaningful value. This is useful, for example, if there is an error or you forget to specify a toolpath workplane. Without a conditional expression, PowerMill would be unable to resolve the parameter and the Workplane Name field would be blank and the cause unknown.
The following example shows how to edit the parameter toolpath.Workplane to include a conditional expression that displays the value 'WORLD' if PowerMill cannot resolve the parameter.
The basic parameter:
<th> Workplane Name</th><td>${toolpath.Workplane}</td>
Edit the parameter, as shown below:
<td> Workplane Name</th><td>${select(error(toolpath.Workplane), "WORLD", "$toolpath.Workplane.Name")}</td>
Conditional expressions include a question and two answers:
In this toolpath workplane example, the question ${select(error(toolpath.Workplane) asks, 'Is there a toolpath workplane present?'
If the answer is 'No. There is no workplane.' PowerMill prints the pre-defined value 'WORLD'. If the answer is 'Yes. There is a workplane.' PowerMill prints the result of the parameter string toolpath.wokplane.name.
When writing your own conditional expressions, use the structure:
${select(error(parameter in question), "value displayed if parameter cannot be resolved", "$parameter to be displayed if <PRODUCt> can resolve parameter")}