Topic: Passing variables to the Code Generator
The value of a macro user variable can be retrieved from within the Code Generator through the system calculator.
In any sort of equation, if the Code Generator can't find a macro variable within its own variable set, it invokes
the system calculator which tries to find it elsewhere. The primary function in the Code Generator where this happens
@DECLARE #INT #codeType @START #EVAL(#codeType=#yourVariableHere)
Then you can use
Be aware not to name your Code Generator variable the same as your macro user variable because then the Code Generator will find the Code Generator variable first and never invoke the calculator to look in the macro system.
Generally variables are used in a macro, but can also be accessed from other places. They can reside in the JOS subsystem with Data Tags (see the Customizing format files - Job Operations Setup data tags topic in the Customization Guide), User Commands can contain them (see User Event in Help) and they can be entered directly.
You can enter variables or expressions in most input fields of the SmartCAM interface. Variable names '#myVar', JOS Data Tags 'JOS(tl_dia)', and Snap Commands 'STX(#el)' are all acceptable inputs. When recording a macro, the variable name or expression is recorded, not the value. This is useful for creating similar parts with variable dimensions for example.
Copyright © 2017 SmartCAMcnc. All Rights Reserved