hexagon logo

SKIPPING OPS WITH IF AND STATEMENTS

Hey all,

A program begins with a basic alignment and then a DCC alignment. When the program starts it asks what op you're checking, 1, 2, or 3 for example. Depending on what you select the program should construct your alignments and then move on to that op. If you're only checking op2 for example, how do you first instruct pcdmis to run the alignment code before moving on to op2? 

It's been years since I've done this and I feel like Forrest Gump all of a sudden.

Thank You

Parents
  • Use an operator comment of type Input, and explain what each input value does. Then have it GOTO where the first feature for that input value is.

    C1         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                1 For Part Number xxxxx
                2 For Part Number xxxxx
                3 For Part Number xxxxx
                IF_GOTO/C1.INPUT == 1,GOTO = PART1
                IF_GOTO/C1.INPUT == 2,GOTO = PART2
                IF_GOTO/C1.INPUT == 3,GOTO = PART3
    PART1      =LABEL/
    $$ NO,
                Alignment data for Input 1
    PART2      =LABEL/
    $$ NO,
                Alignment data for Input 2
    PART3      =LABEL/
    $$ NO,
                Alignment data for Input 3

    What Jacob posted is also a very good solution for this.

Reply
  • Use an operator comment of type Input, and explain what each input value does. Then have it GOTO where the first feature for that input value is.

    C1         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                1 For Part Number xxxxx
                2 For Part Number xxxxx
                3 For Part Number xxxxx
                IF_GOTO/C1.INPUT == 1,GOTO = PART1
                IF_GOTO/C1.INPUT == 2,GOTO = PART2
                IF_GOTO/C1.INPUT == 3,GOTO = PART3
    PART1      =LABEL/
    $$ NO,
                Alignment data for Input 1
    PART2      =LABEL/
    $$ NO,
                Alignment data for Input 2
    PART3      =LABEL/
    $$ NO,
                Alignment data for Input 3

    What Jacob posted is also a very good solution for this.

Children
No Data