clearing operator inputs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • clearing operator inputs

    I need to clear operator inputs when the program is closed. Is there any pcdmis code that will accomplish this? I tried the F5 menu setting for "clear inputs on execution" but that requires the operator to re-enter the data on every run and that wont work as they are running multiple parts on the same order. Any help would be appreciated.

  • #2
    What type of inputs? Could the inputs be empty when they open a program? if so use the flie>quit to exit a program without saving anything to it. If you use file>close to exit a program pcdmis will actually save then close it.

    They would have to open the program with empty fields, enter it all for the first part, then run the batch as usual... but file>quit when finished. They would not need to enter the data for each part the way clear on execution makes it
    Last edited by Douglas; 02-20-2020, 08:26 PM.

    Comment


    • #3
      There is a small vba "ish" tag I throw in, but I've completely forgot! I'll respond tomorrow when I get back in. Something like "delete previous instances".
      sigpic

      Comment


      • #4
        Originally posted by Douglas View Post
        What type of inputs? Could the inputs be empty when they open a program? if so use the flie>quit to exit a program without saving anything to it. If you use file>close to exit a program pcdmis will actually save then close it
        Input comments and yes they need to be clear when the program opens.
        Unfortunately I can not rely on the operators to always "quit" the program. especially since they have been using "close" for many years.
        My company wants to start retaining all CMM reports and I need to ensure that the input data is correct for the order that is being ran at that time and not just the data that was there from the last order ran.
        Last edited by Mark XC; 02-20-2020, 08:33 PM.

        Comment


        • #5
          You could switch over to using forms to enter in the data, i believe they clear every time.

          Comment


          • #6
            Give Inspect 4.1 a try - Use Routine Copy - Under setting - Use temporary routines when executing - This check box tells the software to use a temporary execution folder whenever you execute a routine. Inspect copies the routine and any related files with the same name but with a different extension to a temporary folder for execution:

            C:\Users\<user>AppData\Local\Temp\Hexagon\Inspect\ TempExecutionLocation

            <user> is your Windows user name.

            Inspect removes items from this folder whenever you close Inspect. This protects the original routine from any modification by Inspect. This option is recommended when routines are located on a server, or when you want to keep the original routine untouched.

            Comment


            • #7
              Select "Clear Input On Execution" in setup options general tab.
              Attached Files
              Global Advantage 12-15-10 PH10MQ SP600M V4.2MR3 CAD++

              Comment


              • #8
                I use basic script for that it clears on start will send You that.Can't upload here file too big.

                Comment


                • #9

                  pc dmis code
                  S2 =SCRIPT/FILENAME= C:\USERS\CMM.MAN-SPACE-CRAFT-ONE\OPERATOR INPUT.BAS
                  FUNCTION/Main,SHOW=YES,,
                  STARTSCRIPT/
                  RETRY_INPUT=LABEL/
                  C1 =COMMENT/INPUT,NO,FULL SCREEN=YES,
                  OPERATOR
                  ASSIGN/V_OP=C1.INPUT
                  C2 =COMMENT/INPUT,NO,FULL SCREEN=YES,
                  WORK ORDER
                  CS1 =SCRIPT/FILENAME= C:\USERS\GRZEGORZ FARYNIARZ\DESKTOP\VB SCRIPT\OPERATOR INPUT.BAS
                  FUNCTION/Main,SHOW=YES,,
                  STARTSCRIPT/
                  ASSIGN/V_WO=C2.INPUT
                  COMMENT/REPT,
                  "WORK ORDER-"+ V_WO
                  C3 =COMMENT/INPUT,NO,FULL SCREEN=YES,
                  SERIAL NUMBER
                  ASSIGN/V_SN=C3.INPUT
                  ASSIGN/V_SPACE="_"
                  IF/V_OP=="0"OR V_WO=="0" OR V_SN=="0"
                  GOTO/MISSING_INFO
                  MISSING_INFO =LABEL/
                  COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
                  MISSING REQUIRED INFORMATION
                  GOTO/RETRY_INPUT
                  END_IF/
                  ENDSCRIPT/

                  Comment


                  • #10
                    vb code


                    Dim DmisApp As Object
                    Dim DmisPart As Object
                    Dim DmisCommands As Object
                    Dim DmisCommand As Object

                    Sub Part1
                    Set DmisApp = CreateObject("PCDLRN.Application")
                    Set DmisPart = DmisApp.ActivePartProgram
                    Set DmisCommands = DmisPart.Commands
                    CommandCount = DmisCommands.Count
                    Set DmisCommand = DmisCommands.Item(CommandCount)
                    DmisCommands.InsertionPointAfter DmisCommand


                    Set DmisCommand = DmisCommands.Add(LABEL_CMD, True)
                    DmisCommand.Marked = True
                    ' Set Id = RETRY_INPUT
                    retval = DmisCommand.PutText ("RETRY_INPUT", ID, 0)

                    Set DmisCommand = DmisCommands.Add(SET_COMMENT, True)
                    DmisCommand.Marked = True
                    ' Set Id = C1
                    retval = DmisCommand.PutText ("C1", ID, 0)
                    ' Set Comment Type = Input
                    retval = DmisCommand.SetToggleString (3, COMMENT_TYPE, 0)
                    ' Set Comment Item 1 = OPERATOR
                    retval = DmisCommand.PutText ("OPERATOR", COMMENT_FIELD, 1)
                    ' Set Report = NO
                    retval = DmisCommand.SetToggleString (1, OUTPUT_TYPE, 0)
                    ' Set Full Screen = YES
                    retval = DmisCommand.SetToggleString (2, DISPLAY_TYPE, 0)

                    Set DmisCommand = DmisCommands.Add(ASSIGNMENT, True)
                    DmisCommand.Marked = True
                    ' Set Destination Expression = V_OP
                    retval = DmisCommand.PutText ("V_OP", DEST_EXPR, 0)
                    ' Set Source Expression = C1.Input
                    retval = DmisCommand.PutText ("C1.INPUT", SRC_EXPR, 0)

                    Set DmisCommand = DmisCommands.Add(SET_COMMENT, True)
                    DmisCommand.Marked = True
                    ' Set Id = C2
                    retval = DmisCommand.PutText ("C2", ID, 0)
                    ' Set Comment Type = Input
                    retval = DmisCommand.SetToggleString (3, COMMENT_TYPE, 0)
                    ' Set Comment Item 1 = WORK ORDER
                    retval = DmisCommand.PutText ("WORK ORDER", COMMENT_FIELD, 1)
                    ' Set Report = NO
                    retval = DmisCommand.SetToggleString (1, OUTPUT_TYPE, 0)
                    ' Set Full Screen = YES
                    retval = DmisCommand.SetToggleString (2, DISPLAY_TYPE, 0)

                    Set DmisCommand = DmisCommands.Add(ASSIGNMENT, True)
                    DmisCommand.Marked = True
                    ' Set Destination Expression = V_WO
                    retval = DmisCommand.PutText ("V_WO", DEST_EXPR, 0)
                    ' Set Source Expression = C2.Input
                    retval = DmisCommand.PutText ("C2.INPUT", SRC_EXPR, 0)

                    Set DmisCommand = DmisCommands.Add(SET_COMMENT, True)
                    DmisCommand.Marked = True
                    ' Set Id =
                    retval = DmisCommand.PutText ("", ID, 0)
                    ' Set Comment Type = REPT
                    retval = DmisCommand.SetToggleString (2, COMMENT_TYPE, 0)
                    ' Set Comment Item 1 = WORK ORDER-602336
                    retval = DmisCommand.PutText ("WORK ORDER-602336", COMMENT_FIELD, 1)
                    Result = DmisCommand.SetExpression("""WORK ORDER-""+ V_WO", COMMENT_FIELD, 1)

                    Set DmisCommand = DmisCommands.Add(SET_COMMENT, True)
                    DmisCommand.Marked = True
                    ' Set Id = C3
                    retval = DmisCommand.PutText ("C3", ID, 0)
                    ' Set Comment Type = Input
                    retval = DmisCommand.SetToggleString (3, COMMENT_TYPE, 0)
                    ' Set Comment Item 1 = SERIAL NUMBER
                    retval = DmisCommand.PutText ("SERIAL NUMBER", COMMENT_FIELD, 1)
                    ' Set Report = NO
                    retval = DmisCommand.SetToggleString (1, OUTPUT_TYPE, 0)
                    ' Set Full Screen = YES
                    retval = DmisCommand.SetToggleString (2, DISPLAY_TYPE, 0)

                    Set DmisCommand = DmisCommands.Add(ASSIGNMENT, True)
                    DmisCommand.Marked = True
                    ' Set Destination Expression = V_SN
                    retval = DmisCommand.PutText ("V_SN", DEST_EXPR, 0)
                    ' Set Source Expression = C3.Input
                    retval = DmisCommand.PutText ("C3.INPUT", SRC_EXPR, 0)

                    Set DmisCommand = DmisCommands.Add(ASSIGNMENT, True)
                    DmisCommand.Marked = True
                    ' Set Destination Expression = V_SPACE
                    retval = DmisCommand.PutText ("V_SPACE", DEST_EXPR, 0)
                    ' Set Source Expression = ""_""
                    retval = DmisCommand.PutText ("""_""", SRC_EXPR, 0)

                    Set DmisCommand = DmisCommands.Add(IF_BLOCK_COMMAND, True)
                    DmisCommand.Marked = True
                    ' Set Mode = 3
                    retval = DmisCommand.PutText ("3", MODE_TYPE, 0)
                    ' Set Source Expression = 0
                    retval = DmisCommand.PutText ("0", SRC_EXPR, 0)
                    Result = DmisCommand.SetExpression("V_OP==""0""OR V_WO==""0"" OR V_SN==""0""", SRC_EXPR, 0)

                    Set DmisCommand = DmisCommands.Add(GOTO_COMMAND, True)
                    DmisCommand.Marked = True
                    ' Set Mode = 0
                    retval = DmisCommand.PutText ("0", MODE_TYPE, 0)
                    ' Set Label = MISSING_INFO
                    retval = DmisCommand.PutText ("MISSING_INFO", LABEL_ID, 0)

                    Set DmisCommand = DmisCommands.Add(LABEL_CMD, True)
                    DmisCommand.Marked = True
                    ' Set Id = MISSING_INFO
                    retval = DmisCommand.PutText ("MISSING_INFO", ID, 0)

                    Set DmisCommand = DmisCommands.Add(SET_COMMENT, True)
                    DmisCommand.Marked = True
                    ' Set Id =
                    retval = DmisCommand.PutText ("", ID, 0)
                    ' Set Comment Type = OPER
                    retval = DmisCommand.SetToggleString (1, COMMENT_TYPE, 0)
                    ' Set Comment Item 1 = MISSING REQUIRED INFORMATION
                    retval = DmisCommand.PutText ("MISSING REQUIRED INFORMATION", COMMENT_FIELD, 1)
                    ' Set Report = NO
                    retval = DmisCommand.SetToggleString (1, OUTPUT_TYPE, 0)
                    ' Set Full Screen = YES
                    retval = DmisCommand.SetToggleString (2, DISPLAY_TYPE, 0)
                    ' Set Auto-Continue = NO
                    retval = DmisCommand.PutText ("NO", TIME_ARG, 0)
                    ' Set Time Delay = 0
                    retval = DmisCommand.PutText ("0", T_VALUE, 0)

                    Set DmisCommand = DmisCommands.Add(GOTO_COMMAND, True)
                    DmisCommand.Marked = True
                    ' Set Mode = 0
                    retval = DmisCommand.PutText ("0", MODE_TYPE, 0)
                    ' Set Label = RETRY_INPUT
                    retval = DmisCommand.PutText ("RETRY_INPUT", LABEL_ID, 0)

                    Set DmisCommand = DmisCommands.Add(END_IF_COMMAND, True)
                    DmisCommand.Marked = True
                    ' Set Mode = 3
                    retval = DmisCommand.PutText ("3", MODE_TYPE, 0)

                    End Sub

                    Sub Main

                    Part1

                    DmisPart.RefreshPart
                    End Sub

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    X