I am trying to draw a simple Wafermap which works fine with the following code.
However, when I substitute variables in for the numbers I get a missing reference error and can't for the life of me understand why this is happening. I need some JSL Expert Wisdom
F_makeWaferMap = function({myScale, myWhiteSpace, myWaferDiameter},{},
myKeepOutZone = 2000;
myGraphBox = graphBox(
frameSize( (myWaferDiameter/2)/myScale, (myWaferDiameter/2)/myScale ),
xScale( -myWhiteSpace, myWaferDiameter + myWhiteSpace),
yScale( -myWhiteSpace, myWaferDiameter + myWhiteSpace)
);
frame = myGraphBox[FrameBox(1)];
frame << Add Graphics Script(penColor( "red" ); circle( {150000,150000}, 150000));
frame << Add Graphics Script(penColor( "red" ); circle( {150000,150000}, 150000-2000));
return(myGraphBox);
);
myWmDispObj = F_makeWaferMap(200, 20000, 300000); // Scale, Whitespace, Wafer Diameter
newWindow("Test", vListBox(myWmDispObj));
![thickey_0-1647940685853.png thickey_0-1647940685853.png](https://community.jmp.com/t5/image/serverpage/image-id/41019iF3F5FA94E74771C0/image-size/medium?v=v2&px=400)
I am happily making references to the Frame Box as you can see from the log:
![thickey_1-1647940813033.png thickey_1-1647940813033.png](https://community.jmp.com/t5/image/serverpage/image-id/41020iDC2927C13A39326F/image-size/medium?v=v2&px=400)
So, now lets substitute in some variables.
frame << Add Graphics Script(penColor( "red" ); circle( {myWaferDiameter/2, myWaferDiameter/2}, myWaferDiameter/2));
frame << Add Graphics Script(penColor( "red" ); circle( {myWaferDiameter/2, myWaferDiameter/2}, (myWaferDiameter/2) - myKeepOutZone));
And I get the following Error, suggesting I have lost the reference to my passed in variables when I try to add them to the frame box.
![thickey_2-1647940929283.png thickey_2-1647940929283.png](https://community.jmp.com/t5/image/serverpage/image-id/41021i570C63144EE49873/image-dimensions/895x123?v=v2)
I'm stumped