Code to increment sequence number

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Code to increment sequence number

    Does anyone have some code that increments the sequence number on the report? We remove the main header from the reports that we give the customer becasue they have their own specific header requirements.

    If I can't make it increment, is there a way to have pcdmis use the stats count as the sequence number since that increments on it's own? I have everything else going into the header automaticaly, it would be nice the be able to just have one op wait to change parts when running a capability study.
    Thanks
    Sean Steele

  • #2
    Sean,

    Yes - stats will count and even if you don't use stats you can use report command - comment - input and have the op enter count.

    JRZ
    PC-DMIS CAD++ 3.7 from 4.2 MR1

    Comment


    • #3
      There are a couple of possibilities the best of which Joe mentioned (stats count). What are your constraints? Do you want to start with 1 everytime the program is opened? Say if someone runs 10 today and wants to run some tomorrow do you want to start with 1 or 11 tomorrow?
      <internet bumper sticker goes here>

      Comment


      • #4
        Bumping this up, because I'm curious about this as well. When doing capability studies often I am given 30 samples and would like the stat count to increase with each sample ran. I'd also like to know how to reset the stat count with each time the program is opened for parts I run regularly, but only a few a day. I stamp the parts with the date and a number, in the order that they were run, but it would be nice for the stat count to match the stamp.

        Comment


        • #5
          Use this to start the counting

          Code:
          PARTS      =COMMENT/INPUT,NO,FULL SCREEN=NO,
                      'Number of parts to measure?'
                      IF/PARTS.INPUT > 1
          STARTNUM     =COMMENT/INPUT,NO,FULL SCREEN=NO,
                        Last part measured (1st part = 0)
                      END_IF/
           ASSIGN/COUNT=0
                      IF/STARTNUM.INPUT>0
                        ASSIGN/COUNT=STARTNUM.INPUT
                      END_IF/
          WHILE/COUNT < PARTS.INPUT
          ASSIGN/W_REP6=NOMEN + " # " + (COUNT +1) + " of " + PARTS.INPUT
           COMMENT/REPT,
                        W_REP6

          Then this at the end of the program:
          Code:
           IF/PRT_REPORT == 1
          PRINT/REPORT,EXEC MODE=END,$
          TO_FILE=OFF,AUTO=1,AUTO OPEN REPORT=OFF,$
          TO_PRINTER=OFF,COPIES=1,$
          TO_DMIS_REPORT=OFF,FILE_OPTION=OVERWRITE,FILENAME= ,$
          REPORT_THEORETICALS=ALL,REPORT_FEATURE_WITH_DIMENS IONS=NO,$
          TO_EXCEL_OUTPUT=OFF,
          PREVIOUS_RUNS=DELETE_INSTANCES
          END_IF/
          ASSIGN/COUNT=COUNT + 1
          IF/COUNT<>PARTS.INPUT
          MEASYES =COMMENT/YESNO,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
          "Would you like to measure bracket # " + (COUNT +1)
          IF/MEASYES.INPUT <> "YES"
          ASSIGN/COUNT=PARTS.INPUT
          END_IF/
          END_IF/
          IF/COUNT == PARTS.INPUT
          PRINT/REPORT,EXEC MODE=END,$
          TO_FILE=ON,OVERWRITE=C:\Part Reports\DumpFile.RTF,AUTO OPEN REPORT=OFF,$
          TO_PRINTER=OFF,COPIES=1,$
          TO_DMIS_REPORT=OFF,FILE_OPTION=OVERWRITE,FILENAME= ,$
          REPORT_THEORETICALS=ALL,REPORT_FEATURE_WITH_DIMENS IONS=NO,$
          TO_EXCEL_OUTPUT=OFF,
          PREVIOUS_RUNS=DELETE_INSTANCES
          END_IF/
          END_WHILE

          Comment

          Related Topics

          Collapse

          Working...
          X
          😀
          🥰
          🤢
          😎
          😡
          👍
          👎