Code to increment sequence number

Collapse
X
 
  • Filter
  • 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

          • mtalla
            Keeping stats count
            by mtalla
            Is there any way to keep someone from changing the stats count? I send data to datapage and am prompted to enter a #. But, the sequential # doesn't need...
            09-17-2008, 06:44 PM
          • josip
            Stats Count
            by josip
            Does anyone know How to change stats count to automatically?
            I have to do it manually each time by start of a new measuring.Thanx

            ...
            03-14-2008, 05:24 AM
          • rtlawlor
            Report Headers_.LBL
            by rtlawlor
            I have gone back and forth with these for a couple years, but i think I really like this one. Anyone else doing something similar?

            I wanted...
            09-01-2015, 06:29 PM
          • jjewell
            Stats count issue..anyone ?
            by jjewell
            Ok, in running a multiple run program, lets say for 50 parts ( IE, the program runs and asks the operator if he wants to run another part and goes to...
            07-19-2010, 11:25 AM
          • 1CMM4ME
            Stats Command
            by 1CMM4ME
            Can anyone help me with the 3rd assigned command? I cannot figure out what this command should actually be. I have tried all kinds of code for this, but...
            10-31-2009, 09:24 AM
          Working...
          X