You can download the SqrtRootDone.mg4 (6.8 KB) starting project.
To add a function to the project click on Customize->New Function. Enter the Name and Code.
square(double value)
{
return value*value;
}
It looks like:
Name is the name MacroGen uses to track the function. It is used to identify the function for edit (Customize->Edit Function) and delete (Customize->Delete Function).
The code declares a function square(). It is passed a variable value. It returns value times itself. The returned value will be used in the code point. Click Done and edit the point Calc. In the code section replace sqrt with square. The code will look as follows.
@Measure[Output].Value = square( @Measure[Input].Value );
Click Ok then Refresh button. The drawing will look like:
Here is the final project SquareDone.mg4 (7.2 KB) SquareDone.