hexagon logo

[2023.2 SP3] Looping breaks evaluations using child ITEMS[]?

Program uses cylinders measured as concentric circles.
Roundness evaluation is done on the circles in the cylinders (child items).
This works fine when running one execution, but doesn't work when looping several iterations, instead they all share the exact same result:

The total runout is two separate planes so no issues there, but the circles from the two cylinders (CYLVÄ75 & CYLHÖ75) share the same roundness result per circle in the cylinder.

Opening the program after a looped run and no values:

Example of a single run (no looping):

Any ideas how to make the ITEMS[] work when looping? Are the ITEMS[] clashing with the loop counter [x]?

Parents
  • " Are the ITEMS[] clashing with the loop counter [x]? "

    Yes, that's exactly why it doesn't work that way.

    You have to access the main element with the loop index and then call the items

      DIM LOC1= LOCATION OF  CYL_22[LOOPINDEX].ITEM[CIRCLE0]  UNITS=MM ,$
      GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
      AX    NOMINAL       MEAS       +TOL       -TOL        DEV     OUTTOL
      X      140.500    140.500      0.020     -0.020      0.000      0.000
      Y        0.000      0.000      0.010     -0.010      0.000      0.000
      Z        0.000      0.000      0.010     -0.010      0.000      0.000
      D      122.000    122.000      0.010     -0.010      0.000      0.000
      END OF DIMENSION LOC1

    (At least it worked for me in a test)

Reply
  • " Are the ITEMS[] clashing with the loop counter [x]? "

    Yes, that's exactly why it doesn't work that way.

    You have to access the main element with the loop index and then call the items

      DIM LOC1= LOCATION OF  CYL_22[LOOPINDEX].ITEM[CIRCLE0]  UNITS=MM ,$
      GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
      AX    NOMINAL       MEAS       +TOL       -TOL        DEV     OUTTOL
      X      140.500    140.500      0.020     -0.020      0.000      0.000
      Y        0.000      0.000      0.010     -0.010      0.000      0.000
      Z        0.000      0.000      0.010     -0.010      0.000      0.000
      D      122.000    122.000      0.010     -0.010      0.000      0.000
      END OF DIMENSION LOC1

    (At least it worked for me in a test)

Children
No Data