This section provides examples of parameters, and differences in their use between macros and setup sheets.
Task |
Use in macros |
Use in setup sheets |
Comments |
Get the limits of an NC Program with regard to its output workplane. |
ENTITY ncp = entity('ncprogram', '') REAL LIST nc_limits = ${limits_workplane_rel (ncp, ncp. OutputWorkplane)} PRINT $nc_limits[0] PRINT $nc_limits[1] … PRINT $nc_limits[5] |
${limits_workplane_rel(entity('ncprogram', ncprogram.Name), ncprogram.OutputWorkplane)[0]} … ${limits_workplane_rel(entity('ncprogram', ncprogram.Name), ncprogram.OutputWorkplane)[5]} |
The X Min is displayed in in one statement in the setup sheet, but in multiple statements in the macro. They both have the same meaning. In setup sheets, entity() and ncprogram.OutputWorkplane are used. ncprogram cannot be used on its own: it can only be used to if you need a sub-parameter. |
Print the fixture offset of the current NC Toolpath. |
REAL nctoolpath_index = // get the toolpath number by looping the NC Toolpaths REAL LIST fixture_offset = ${nctoolpath_fixtureoffset(entity('ncprogram', '').nctoolpath[nctoolpath_index])} PRINT $fixture_offset[0] PRINT $fixture_offset[1] PRINT $fixture_offset[2] |
${nctoolpath_fixtureoffset(nctoolpath)[0]} ${nctoolpath_fixtureoffset(nctoolpath)[1]} ${nctoolpath_fixtureoffset(nctoolpath)[2]} |
Access nctoolpath parameters through ${nctoolpath.*}. |
Display a list of tools in an NC Program. |
STRING LIST nctool_list = ${list_nctools(entity('ncprogram', ''))} PRINT ${nctool_list[0]} PRINT ${nctool_list[size(nctool_list)-1]} |
${list_nctools(entity('ncprogram', ncprogram.Name))[0]} ${join(list_nctools(entity('ncprogram', ncprogram.name)), ',')} |
There is no way to loop on an array such as the tool list, so it is converted to a string for displaying in setup sheets as a comma-separated list. |