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 tried this and it works fine for me so far.
    PROF1 =SURFACE PROFILE : CABLEFACE1
    FEATCTRLFRAME/SHOWPARAMS=YES,SHOWEXPANDED=YES
    CADGRAPH=OFF,REPORTGRAPH=OFF,TEXT=OFF,[U][B][COLOR=#FF0000]MULT=0.00[/COLOR][/B][/U],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/PROF1
    FEATURES/CABLEFACE1,,
    
    IF/PROF1.OUTTOL > 0
    GOTO/DIMREC
    END_IF/
    
    QCI1 =LABEL/
    
    QCI7 =SURFACE PROFILE : CABLEFACE1
    FEATCTRLFRAME/SHOWPARAMS=YES,SHOWEXPANDED=YES
    CADGRAPH=BOTH,REPORTGRAPH=OFF,TEXT=OFF,[U][B][COLOR=#FF0000]MULT=10.00[/COLOR][/B][/U],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/QCI7
    FEATURES/CABLEFACE1,,
    
    DIMREC =LABEL/
    
    IF/QCI7.OUTTOL < 1
    GOTO/QCIPASS
    END_IF/
    
    QCIPASS =LABEL/


    this is kind of what I was talking about. I'm not familiar with profiles so i'm not sure what this MULT is but why measure it with 0.0 and if it fails, measure it again with MULT at 10.00? Why not start with 10.00 from the get go? Just trying to understand and learn.

    Also, when posting code, type [cod*e] on your first line, second line paste your code and last line [/cod*e] and it will appear much neater for others to read. Leave out the * in the words code.
Reply
  • I tried this and it works fine for me so far.
    PROF1 =SURFACE PROFILE : CABLEFACE1
    FEATCTRLFRAME/SHOWPARAMS=YES,SHOWEXPANDED=YES
    CADGRAPH=OFF,REPORTGRAPH=OFF,TEXT=OFF,[U][B][COLOR=#FF0000]MULT=0.00[/COLOR][/B][/U],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/PROF1
    FEATURES/CABLEFACE1,,
    
    IF/PROF1.OUTTOL > 0
    GOTO/DIMREC
    END_IF/
    
    QCI1 =LABEL/
    
    QCI7 =SURFACE PROFILE : CABLEFACE1
    FEATCTRLFRAME/SHOWPARAMS=YES,SHOWEXPANDED=YES
    CADGRAPH=BOTH,REPORTGRAPH=OFF,TEXT=OFF,[U][B][COLOR=#FF0000]MULT=10.00[/COLOR][/B][/U],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/QCI7
    FEATURES/CABLEFACE1,,
    
    DIMREC =LABEL/
    
    IF/QCI7.OUTTOL < 1
    GOTO/QCIPASS
    END_IF/
    
    QCIPASS =LABEL/


    this is kind of what I was talking about. I'm not familiar with profiles so i'm not sure what this MULT is but why measure it with 0.0 and if it fails, measure it again with MULT at 10.00? Why not start with 10.00 from the get go? Just trying to understand and learn.

    Also, when posting code, type [cod*e] on your first line, second line paste your code and last line [/cod*e] and it will appear much neater for others to read. Leave out the * in the words code.
Children
No Data