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
  • Thanks that is probably the better way to go about it in that particular situation.

    Maybe in my proham I am looking at it in the wrong way. The first two dimensions in the code output are set to "STATS". At the end of the program the dimension code output is set to "REPORT". My problem is that I want to hide the out of tolerance dimension at the end and display the recheck or vice versa.

    I'll show you the code to help.


    CABLEFACE1 =FEAT/PLANE,CARTESIAN,TRIANGLE
    THEO/<-10.417,112.878,-10.121>,<0.9394455,-0.2160752,-0.2659955>
    ACTL/<-10.115,112.825,-10.206>,<0.9361055,-0.231182,-0.2650686>
    MEAS/PLANE,6
    HIT/BASIC,NORMAL,<-1.71,133.11,4.197>,<0.9394455,-0.2160752,-0.2659955>,<-1.14,132.993,4.034>,USE THEO=YES
    HIT/BASIC,NORMAL,<-2.057,122.079,11.934>,<0.9394455,-0.2160752,-0.2659955>,<-1.595,121.991,11.804>,USE THEO=YES
    HIT/BASIC,NORMAL,<-10.97,106.679,-7.036>,<0.9394455,-0.2160752,-0.2659955>,<-10.751,106.645,-7.095>,USE THEO=YES
    HIT/BASIC,NORMAL,<-11.107,116.591,-15.573>,<0.9394455,-0.2160752,-0.2659955>,<-10.731,116.521,-15.681>,USE THEO=YES
    HIT/BASIC,NORMAL,<-18.462,105.472,-32.518>,<0.9394455,-0.2160752,-0.2659955>,<-18.261,105.441,-32.578>,USE THEO=YES
    HIT/BASIC,NORMAL,<-18.198,93.338,-21.728>,<0.9394455,-0.2160752,-0.2659955>,<-18.214,93.358,-21.721>,USE THEO=YES
    ENDMEAS/

    CABPROF1 =SURFACE PROFILE : CABLEFACE1
    FEATCTRLFRAME/SHOWPARAMS=YES,SHOWEXPANDED=YES
    CADGRAPH=OFF,REPORTGRAPH=OFF,TEXT=OFF,MULT=0.00,ARROWDENSITY=100,OUTPUT=STATS,UNITS=MM
    COMPOSITE=NO,
    CUSTOMIZED DRF=NO
    STANDARDTYPE=ASME_Y14_5
    PRIMARY DIMENSION/PROFILE OF SURFACE,1,<UZ>,<UTol>,A,B,C,<MC>
    NOTE/CABPROF1
    FEATURES/CABLEFACE1,,

    IF/CABPROF1.OUTTOL>0
    GOTO/FAIL6
    END_IF/
    IF/CABPROF1.OUTTOL<1
    GOTO/PASS6
    END_IF/

    FAIL6 =LABEL/

    CABLEFACE2 =FEAT/PLANE,CARTESIAN,TRIANGLE
    THEO/<-5.1,120.672,2.327>,<0.9394455,-0.2160752,-0.2659955>
    ACTL/<-5.79,119.756,2.252>,<0.9377972,-0.2261805,-0.2633987>
    MEAS/PLANE,3
    HIT/BASIC,NORMAL,<-2.118,131.739,3.87>,<0.9394455,-0.2160752,-0.2659955>,<-2.704,130.801,3.757>,USE THEO=YES
    HIT/BASIC,NORMAL,<-2.72,117.958,12.94>,<0.9394455,-0.2160752,-0.2659955>,<-3.454,117.066,12.877>,USE THEO=YES
    HIT/BASIC,NORMAL,<-10.464,112.317,-9.829>,<0.9394455,-0.2160752,-0.2659955>,<-11.212,111.401,-9.879>,USE THEO=YES
    ENDMEAS/

    PASS6 =LABEL/

    QCI #7 =SURFACE PROFILE : CABLEFACE1
    FEATCTRLFRAME/SHOWPARAMS=YES,SHOWEXPANDED=YES
    CADGRAPH=BOTH,REPORTGRAPH=OFF,TEXT=OFF,MULT=10.00,ARROWDENSITY=100,OUTPUT=BOTH,UNITS=MM
    COMPOSITE=NO,
    CUSTOMIZED DRF=NO
    STANDARDTYPE=ASME_Y14_5
    PRIMARY DIMENSION/PROFILE OF SURFACE,1,<UZ>,<UTol>,A,B,C
    NOTE/QCI #7
    FEATURES/CABLEFACE1,,

    QCI #7 - RECHECK =SURFACE PROFILE : CABLEFACE2
    FEATCTRLFRAME/SHOWPARAMS=YES,SHOWEXPANDED=YES
    CADGRAPH=BOTH,REPORTGRAPH=OFF,TEXT=OFF,MULT=10.00,ARROWDENSITY=100,OUTPUT=BOTH,UNITS=MM
    COMPOSITE=NO,
    CUSTOMIZED DRF=NO
    STANDARDTYPE=ASME_Y14_5
    PRIMARY DIMENSION/PROFILE OF SURFACE,1,<UZ>,<UTol>,A,B,C
    NOTE/QCI #7 - RECH2 - RECH2
    FEATURES/CABLEFACE2,
Reply
  • Thanks that is probably the better way to go about it in that particular situation.

    Maybe in my proham I am looking at it in the wrong way. The first two dimensions in the code output are set to "STATS". At the end of the program the dimension code output is set to "REPORT". My problem is that I want to hide the out of tolerance dimension at the end and display the recheck or vice versa.

    I'll show you the code to help.


    CABLEFACE1 =FEAT/PLANE,CARTESIAN,TRIANGLE
    THEO/<-10.417,112.878,-10.121>,<0.9394455,-0.2160752,-0.2659955>
    ACTL/<-10.115,112.825,-10.206>,<0.9361055,-0.231182,-0.2650686>
    MEAS/PLANE,6
    HIT/BASIC,NORMAL,<-1.71,133.11,4.197>,<0.9394455,-0.2160752,-0.2659955>,<-1.14,132.993,4.034>,USE THEO=YES
    HIT/BASIC,NORMAL,<-2.057,122.079,11.934>,<0.9394455,-0.2160752,-0.2659955>,<-1.595,121.991,11.804>,USE THEO=YES
    HIT/BASIC,NORMAL,<-10.97,106.679,-7.036>,<0.9394455,-0.2160752,-0.2659955>,<-10.751,106.645,-7.095>,USE THEO=YES
    HIT/BASIC,NORMAL,<-11.107,116.591,-15.573>,<0.9394455,-0.2160752,-0.2659955>,<-10.731,116.521,-15.681>,USE THEO=YES
    HIT/BASIC,NORMAL,<-18.462,105.472,-32.518>,<0.9394455,-0.2160752,-0.2659955>,<-18.261,105.441,-32.578>,USE THEO=YES
    HIT/BASIC,NORMAL,<-18.198,93.338,-21.728>,<0.9394455,-0.2160752,-0.2659955>,<-18.214,93.358,-21.721>,USE THEO=YES
    ENDMEAS/

    CABPROF1 =SURFACE PROFILE : CABLEFACE1
    FEATCTRLFRAME/SHOWPARAMS=YES,SHOWEXPANDED=YES
    CADGRAPH=OFF,REPORTGRAPH=OFF,TEXT=OFF,MULT=0.00,ARROWDENSITY=100,OUTPUT=STATS,UNITS=MM
    COMPOSITE=NO,
    CUSTOMIZED DRF=NO
    STANDARDTYPE=ASME_Y14_5
    PRIMARY DIMENSION/PROFILE OF SURFACE,1,<UZ>,<UTol>,A,B,C,<MC>
    NOTE/CABPROF1
    FEATURES/CABLEFACE1,,

    IF/CABPROF1.OUTTOL>0
    GOTO/FAIL6
    END_IF/
    IF/CABPROF1.OUTTOL<1
    GOTO/PASS6
    END_IF/

    FAIL6 =LABEL/

    CABLEFACE2 =FEAT/PLANE,CARTESIAN,TRIANGLE
    THEO/<-5.1,120.672,2.327>,<0.9394455,-0.2160752,-0.2659955>
    ACTL/<-5.79,119.756,2.252>,<0.9377972,-0.2261805,-0.2633987>
    MEAS/PLANE,3
    HIT/BASIC,NORMAL,<-2.118,131.739,3.87>,<0.9394455,-0.2160752,-0.2659955>,<-2.704,130.801,3.757>,USE THEO=YES
    HIT/BASIC,NORMAL,<-2.72,117.958,12.94>,<0.9394455,-0.2160752,-0.2659955>,<-3.454,117.066,12.877>,USE THEO=YES
    HIT/BASIC,NORMAL,<-10.464,112.317,-9.829>,<0.9394455,-0.2160752,-0.2659955>,<-11.212,111.401,-9.879>,USE THEO=YES
    ENDMEAS/

    PASS6 =LABEL/

    QCI #7 =SURFACE PROFILE : CABLEFACE1
    FEATCTRLFRAME/SHOWPARAMS=YES,SHOWEXPANDED=YES
    CADGRAPH=BOTH,REPORTGRAPH=OFF,TEXT=OFF,MULT=10.00,ARROWDENSITY=100,OUTPUT=BOTH,UNITS=MM
    COMPOSITE=NO,
    CUSTOMIZED DRF=NO
    STANDARDTYPE=ASME_Y14_5
    PRIMARY DIMENSION/PROFILE OF SURFACE,1,<UZ>,<UTol>,A,B,C
    NOTE/QCI #7
    FEATURES/CABLEFACE1,,

    QCI #7 - RECHECK =SURFACE PROFILE : CABLEFACE2
    FEATCTRLFRAME/SHOWPARAMS=YES,SHOWEXPANDED=YES
    CADGRAPH=BOTH,REPORTGRAPH=OFF,TEXT=OFF,MULT=10.00,ARROWDENSITY=100,OUTPUT=BOTH,UNITS=MM
    COMPOSITE=NO,
    CUSTOMIZED DRF=NO
    STANDARDTYPE=ASME_Y14_5
    PRIMARY DIMENSION/PROFILE OF SURFACE,1,<UZ>,<UTol>,A,B,C
    NOTE/QCI #7 - RECH2 - RECH2
    FEATURES/CABLEFACE2,
Children
No Data