Ok, so I'm trying to make a high point plane from 2 surfaces using 3 points, and forcing the 2 highest points to be on different surfaces and forcing the 3rd point to be neither of those 2 points (thanks JEFMAN ), but I have a problem. The If/then, If/Else variable isn't populating the Cast Point after a run. It comes up with 0,0,0 for the Actual. When I refresh the point by retyping the variable name into the point, it updates as expected. Any idea what could be wrong with it, or if there is a different way to go about generating the 3rd point?

Code:

DAT_A1 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN THEO/<2340.244,245.186,634.04>,<0,-0.5735764,-0.819152> ACTL/<2340.381,244.453,634.074>,<-0.0002777,-0.5739187,-0.8189123> TARG/<2340.244,245.186,634.04>,<0,-0.5735764,-0.819152> SNAP=NO SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=YES AVOIDANCE MOVE=BOTH,DISTANCE=3 SHOW HITS=NO ........removed DAT_A12 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN THEO/<2340.236,219.428,652.076>,<0,-0.5735764,-0.819152> ACTL/<2340.654,218.696,652.11>,<-0.0002777,-0.5739187,-0.8189123> TARG/<2340.236,219.428,652.076>,<0,-0.5735764,-0.819152> SNAP=NO SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=YES AVOIDANCE MOVE=BOTH,DISTANCE=3 SHOW HITS=NO ........removed ALN1 =ALIGNMENT/START,RECALL:ALN0,LIST=YES ALIGNMENT/ITERATE PNT TARGET RAD=0.25,START LABEL=,FIXTURE TOL=0.15,ERROR LABEL= MEAS ALL FEAT=ALWAYS,MAX ITERATIONS=3,LEVEL AXIS=ZAXIS,ROTATE AXIS=YAXIS,ORIGIN AXIS=XAXIS LEVEL=DAT_A1,DAT_A2,DAT_A3,DAT_A4,DAT_A5,DAT_A6,DAT_A7,DAT_A8, DAT_A9,DAT_A10,DAT_A11,DAT_A12,, ROTATE=PB1,PB2,, ORIGIN=PC1,, ALIGNMENT/END SCN1 =FEAT/SET,CARTESIAN THEO/<2346.72,242.128,636.182>,<0,0,1> ACTL/<2346.72,242.127,636.18>,<0,0,1> CONSTR/SET,BASIC,DAT_A1,DAT_A2,DAT_A3,DAT_A4,DAT_A5,DAT_A6,, SCN2 =FEAT/SET,CARTESIAN THEO/<2346.702,222.465,649.949>,<0,0,1> ACTL/<2346.702,222.466,649.95>,<0,0,1> CONSTR/SET,BASIC,DAT_A7,DAT_A8,DAT_A9,DAT_A10,DAT_A11,DAT_A12,, ASSIGN/D1=DOT(SCN1.HIT[1..SCN1.NUMHITS].XYZ-SCN1.HIT[1..SCN1.NUMHITS].TXYZ,SCN1.HIT[1..SCN1.NUMHITS].TIJK) ASSIGN/D2=DOT(SCN2.HIT[1..SCN2.NUMHITS].XYZ-SCN2.HIT[1..SCN2.NUMHITS].TXYZ,SCN2.HIT[1..SCN2.NUMHITS].TIJK) ASSIGN/DP1=MAXINDICES(D1) ASSIGN/DP2=MAXINDICES(D2) ASSIGN/P1=ELEMENT(DP1[1], ",", "DAT_A1,DAT_A2,DAT_A3,DAT_A4,DAT_A5,DAT_A6") ASSIGN/P2=ELEMENT(DP2[1], ",", "DAT_A7,DAT_A8,DAT_A9,DAT_A10,DAT_A11,DAT_A12") ASSIGN/PP1=ELEMENT(DP1[2], ",", "DAT_A1,DAT_A2,DAT_A3,DAT_A4,DAT_A5,DAT_A6") ASSIGN/PP2=ELEMENT(DP2[2], ",", "DAT_A7,DAT_A8,DAT_A9,DAT_A10,DAT_A11,DAT_A12") IF/D1[2]>D2[2] ASSIGN/P3=PP1[2] END_IF/ ELSE_IF/D2[2]>D1[2] ASSIGN/P3=PP2[2] END_ELSEIF/ PNT_A1 =FEAT/POINT,CARTESIAN,NO THEO/<2340.236,239.08,638.316>,<0,-0.5735764,-0.819152> ACTL/<2340.236,239.057,638.283>,<0,-0.5735764,-0.819152> CONSTR/POINT,CAST,P1 PNT_A2 =FEAT/POINT,CARTESIAN,NO THEO/<2350.274,225.522,647.809>,<0,-0.5735764,-0.819152> ACTL/<2350.274,225.512,647.794>,<0,-0.5735764,-0.819152> CONSTR/POINT,CAST,P2 PNT_A3 =FEAT/POINT,CARTESIAN,NO THEO/<2340.243,225.527,647.805>,<0,-0.5735764,-0.819152> ACTL/<0,0,0>,<0,0,1> CONSTR/POINT,CAST,P3 ......removed ALN2 =ALIGNMENT/START,RECALL:ALN1,LIST=YES ALIGNMENT/BF3D,LEAST_SQR,CREATE WEIGHTS=NO,ROTANDTRANS,USE SCALING=NO,278.351,-360.478,-521.555,5.409,-14.452,-16.523 ITERATEANDREPIERCECAD=NO Deviation Threshold=0.01 SHOWALLINPUTS=NO,SHOWALLPARAMS=NO ALIGNMENT/END .......removed DIM LOC1= LOCATION OF POINT DAT_A1 UNITS=MM ,$ GRAPH=OFF TEXT=OFF MULT=1.00 OUTPUT=BOTH HALF ANGLE=NO AX MEAS NOMINAL +TOL -TOL DEV OUTTOL T -14.291 0.000 0.150 0.150 -14.291 14.141 END OF DIMENSION LOC1

## Comment