hexagon logo

MIN(array) and MAX(array) not working for me

version 2021.2 in case that matters.

I have a short arc, and I measured it as a cylinder (it's long even though the arc length is short) and I had to use Fixed Radius so I could get a reporting of the X and Y.

I need the radius.

So I aligned the cylinder, and then want the polar radius of each of 15 points.

I did a do/until and stuffed all the PR's into an array.

I then asked for the MAX and MIN value.

No joy.

I went to this thread: https://www.pcdmisforum.com/forum/pc-dmis-enterprise-metrology-software/pc-dmis-for-cmms/523659-help-with-min-and-max
and I copied the examples from people doing the same thing as me, just simple X and Y rather than PR, and no joy.

By "no joy" I mean that it is stuffing the ENTIRE array into the variable that is to get just the MAX or MIN.

I'm including a screen shot during run-time so you can see my mouse over the SECOND assignment (I think it should be ok at one, but I copied the example of the last helper when the first one failed).

I changed from variable names I could read and identify later to V1 and such.

VCNT is the counter to create the array and set indices in it.
V1 the array with all the PR's in it (evaluated as X^2 + Y^2, quantity square root) and the answers I get match what I would get doing the output manually. (Side note, it says .hits[vcnt] because .hit[vcnt] was giving me the nominal PR for all 15 indices)
V2 is supposed to be the MAX of V1.
VLRG is just putting the value of V2 in there, which should be JUST the Max value from V1.
The mouse is on VLRG, and you can see it has 15 values.

What am I doing stupid? I'm sure it is me, but I just don't see the logic error I'm making. Especially since I did it on my own and failed multiple ways for a long time before I found that thread and copied it. I was already doing it, for all intents and purposes, but I tried to copy it as verbatim as I could get.

(I can paste code, but I'm thinking the pic below of the code should be enough to see where I'm screwing up)

TIA


Parents Reply Children