hexagon logo

MIN/MAX of 186 distance dimensions

Hello all,
Wondering if i can get help with this real quick. I am currently programming a fairly large part, and wanting to throw in thicknesses (copy/paste points on opposing surfaces), more as sort of a red flag for any areas to double check (manually).

So I have distance dimensions, labeled "DIST1" thru "DIST186". I am trying to use variables and generic features to pass on only the MIN and MAX of these, to keep the already hefty report, down a few pages.

the problem I'm having, I'm not entirely sure the cause, but the MIN and MAX variables are putting out the same measurement (MAX). I'm wondering if it is because I am creating such a large array, and if i need to section it out with smaller arrays somehow?

Currently "DIST1" and "DIST2" are my min and max values, so I have shown them here. and shortened when pasting here, and only provided the relevant code. Any help or suggestions are greatly appreciated.

Here is my code:

DIM DIST1= 3D DISTANCE FROM POINT PNT1 TO POINT PNT_A1,SHORTEST=OFF,NO_RADIUS UNITS=IN,$
GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=NONE
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
M 1.0470 0.0050 0.0050 1.0480 0.0010 0.0000 -----#---
DIM DIST2= 3D DISTANCE FROM POINT PNT2 TO POINT PNT_A2,SHORTEST=OFF,NO_RADIUS UNITS=IN,$
GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=NONE
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
M 1.0470 0.0050 0.0050 1.0460 -0.0010 0.0000 ---#-----

---(all in between dimensions)---

DIM DIST186= 3D DISTANCE FROM POINT PNT191 TO POINT PNT_A191,SHORTEST=OFF,NO_RADIUS UNITS=IN,$
GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=NONE
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
M 1.0470 0.0050 0.0050 1.0470 0.0000 0.0000 ----#----
V1 =LOOP/START,ID=YES,NUMBER=186,START=1,SKIP=,
OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=0
ASSIGN/V2="DIST"+V1
ASSIGN/DIST_ARRAY[V1]=V2.MEAS
LOOP/END
ASSIGN/V3=MAX(DIST_ARRAY)
ASSIGN/V4=MIN(DIST_ARRAY)
Parents
  • thanks, I might try that if i cant get this to work. , that might also work, as I was thinking that the array is too large possibly.

    Although, I noticed something interesting. When I hover my cursor over the MIN and MAX variables, they both show "= 1.04800000505447393" so this Is where I thought the code was wrong somehow.
    BUT, when I put the variables into the generic features(lines), and then dimension them, they came out correct! Now, my only concern is that I'm currently offline, and was just trying to force a measurement, so that I could test the code. So hopefully this holds when I actually measure the part. I can update this thread when that happens.
Reply
  • thanks, I might try that if i cant get this to work. , that might also work, as I was thinking that the array is too large possibly.

    Although, I noticed something interesting. When I hover my cursor over the MIN and MAX variables, they both show "= 1.04800000505447393" so this Is where I thought the code was wrong somehow.
    BUT, when I put the variables into the generic features(lines), and then dimension them, they came out correct! Now, my only concern is that I'm currently offline, and was just trying to force a measurement, so that I could test the code. So hopefully this holds when I actually measure the part. I can update this thread when that happens.
Children
No Data