Parameters and template pages

You can use parameters to create setup sheets for a project.

Common parameters

There are a number of common parameters that can be used in both setup sheets and macros:

Parameters only used in setup sheets

There are a parameters that can only be used in setup sheets. This is due to the nature of setup sheets: they aim to achieve a goal within a single statement. There are also other restrictions:

The following table summarises the differences between the use of parameters in macros and setup sheets.

Note: For more information, click Help > Parameters > Documentation > Setup Sheet Summary.

Parameter

Use in macros

Use in setup sheets

Parameter definition

REAL r = 10

Parameter definition is not supported. You can only use previously defined parameters.

Parameter printing

PRINT “Stepover is ${entity('toolpath',

'1').Stepover}”

Stepover is ${entity('toolpath',

'1').Stepover}.

Commands

PRINT “Stepover is ${entity('toolpath',

'1').Stepover}”

You cannot use commands. The effect of putting parameters between ${} brackets is similar to using the PRINT command. The difference is that only the value is printed, and it is printed to the setup sheet file.

If statements

IF (${error(Workplane)} == 0) {

PRINT ${Workplane.Name}

} ELSE {

PRINT “World”

}

Not supported. However, you can use a parameter function to perform simple things which require the same behaviour:

${select(“error(Workplane) == 0”,

Workplane.Name, “World”)}.

While, For loops

Consult the macro manual.

No supported. However, the syntax of <summaryrow> mimics looping over toolpaths. <toolrow> mimics looping over tools.

Note: The toolpath header, NC Program header, and summary HTML pages are repeated for each toolpath or NC Program. However, the parameters depend upon the individual toolpath or NC program PowerMill.