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
  • I haven't tested this, but I would trap it at the feature and do an immediate remeasure.

    ASSIGN/MDEPTH=.125
    REMEAS1    =LABEL/
    CIR1       =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                THEO/<-1.0273,0.95,-0.5218>,<0,0,-1>,0.776
                ACTL/<-1.0273,0.95,-0.5218>,<0,0,-1>,0.78
                TARG/<-1.0273,0.95,-0.5218>,<0,0,-1>
                START ANG=0,END ANG=360
                ANGLE VEC=<-1,0,0>
                DIRECTION=CCW
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=YES
                  NUMHITS=7,DEPTH=MDEPTH,PITCH=0
                  SAMPLE METHOD=SAMPLE_HITS
                  SAMPLE HITS=3,SPACER=0
                  AVOIDANCE MOVE=NO,DISTANCE=0.3937
                  FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                SHOW HITS=NO
                IF/ABS(CIR1.D-CIR1.TD)>.005
                IF_GOTO/MDEPTH==.375,GOTO = SKIP1
                ASSIGN/MDEPTH=.375
                GOTO/REMEAS1
                END_IF/
    SKIP1      =LABEL/
Reply
  • I haven't tested this, but I would trap it at the feature and do an immediate remeasure.

    ASSIGN/MDEPTH=.125
    REMEAS1    =LABEL/
    CIR1       =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                THEO/<-1.0273,0.95,-0.5218>,<0,0,-1>,0.776
                ACTL/<-1.0273,0.95,-0.5218>,<0,0,-1>,0.78
                TARG/<-1.0273,0.95,-0.5218>,<0,0,-1>
                START ANG=0,END ANG=360
                ANGLE VEC=<-1,0,0>
                DIRECTION=CCW
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=YES
                  NUMHITS=7,DEPTH=MDEPTH,PITCH=0
                  SAMPLE METHOD=SAMPLE_HITS
                  SAMPLE HITS=3,SPACER=0
                  AVOIDANCE MOVE=NO,DISTANCE=0.3937
                  FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                SHOW HITS=NO
                IF/ABS(CIR1.D-CIR1.TD)>.005
                IF_GOTO/MDEPTH==.375,GOTO = SKIP1
                ASSIGN/MDEPTH=.375
                GOTO/REMEAS1
                END_IF/
    SKIP1      =LABEL/
Children
No Data