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
  • If I understood you correctly:

    CIR5       =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                THEO/<4.8819,1.9685,0>,<0,0,1>,2.3819
                ACTL/<4.8819,1.9685,0>,<0,0,1>,2.3819
                TARG/<4.8819,1.9685,0>,<0,0,1>
                START ANG=0,END ANG=360
                ANGLE VEC=<1,0,0>
                DIRECTION=CW
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=YES
                  NUMHITS=3,DEPTH=-0.14,PITCH=0
                  SAMPLE METHOD=SAMPLE_HITS
                  SAMPLE HITS=0,SPACER=0
                  AVOIDANCE MOVE=NO,DISTANCE=0.3937
                  FIND HOLE=NOCENTER,ONERROR=NO,READ POS=NO
                SHOW HITS=NO
                ASSIGN/[COLOR=#FF0000]IOFLAG1="BOTH"[/COLOR]
                IF/CIR5.D > 2.380 OR CIR5.D < 2.375
                  ASSIGN/[COLOR=#FF0000]IOFLAG1="NONE"[/COLOR]
                END_IF/
    DIM D1= LOCATION OF CIRCLE CIR5  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=[COLOR=#FF0000]IOFLAG1[/COLOR]  HALF ANGLE=NO
    AX    NOMINAL       +TOL       -TOL       MEAS        DEV     OUTTOL
    D       2.3875     0.0025     0.0025     2.3819    -0.0056     0.0031 <--------
    END OF DIMENSION D1
    
  • It's weird to 'write' in there. I tab into it and type carefully, any mistake and you'd have to start all over. It doesn't accept spaces or backspaces and stuff. Play around with it. Make sure you have an ASSIGNMENT ready with "BOTH", "REPORT", "NONE", etc. and don't just type anything in there.
Reply Children
No Data