hexagon logo

Code to mark/unmark out of tolerance dimensions

I am trying to figure out a way to automatically mark or unmark feature dimensions that are out of tolerance.
I have a program that includes some if/then statements where it re-measures a diameter at a different depth if the first one is OOT.
So my problem is that in the reporting portion of the program, I want the program to only reflect the in tolerance measurement and not the failed measurements.

I can post the code if it helps.
I am slightly familiar with using vb scripts.


Parents
  • Create 2 dimensions for the same feature. LOC1 and LOC1_OOT.
    change the output from REPORT to NONE or STATS on the first LOC1.
    then use a if/end if with a comment ( the comment being the second dimension LOC1_OOT) with output to REPORT.

    Now when you measure the feature, if its in tolerance, it will not be reported but it will send stats. If its OOT, it will display the second dimension on the report notifying the operator of the out of tolerance condition.

    Only shows if the out of tolerance is greater than zero.

    DIM LOC1= LOCATION OF CIRCLE [B][U]CIR1[/U][/B]  UNITS=MM ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=[U][B]STATS  [/B][/U]HALF ANGLE=NO
    AX    NOMINAL       +TOL       -TOL       MEAS        DEV     OUTTOL
    D       30.000      0.051      0.051     30.000      0.000      0.000 ----#----
    END OF DIMENSION LOC1
                IF/LOC1.D.OUTTOL>0
      DIM LOC1_OOT= LOCATION OF CIRCLE [U][B]CIR1[/B][/U]  UNITS=MM ,$
      GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=[U][B]BOTH  [/B][/U]HALF ANGLE=NO
      AX    NOMINAL       +TOL       -TOL       MEAS        DEV     OUTTOL
      D       30.000      0.051      0.051     30.000      0.000      0.000 ----#----
      END OF DIMENSION LOC1_OOT
                END_IF/
    
  • I did this for a while until we decided that if they are not critical, don't check them as often or not at all. So all I check now are just critical dimensions. There was some comments on another thread about why remeasure the feature again. Would the second check be more accurate? If so, why not measure it like that from the beginning? Which kind of takes you back to square 1.
Reply
  • I did this for a while until we decided that if they are not critical, don't check them as often or not at all. So all I check now are just critical dimensions. There was some comments on another thread about why remeasure the feature again. Would the second check be more accurate? If so, why not measure it like that from the beginning? Which kind of takes you back to square 1.
Children
No Data