Clear Report Data Midway Through Program

  • Filter
  • Time
  • Show
Clear All
new posts

  • Clear Report Data Midway Through Program

    I am looking for a way to clear the report data part way through my program.

    The reason for this is that I am looping a second time through the program if the part is out of tolerance or the alignment was not done correctly the first time. When this happens it displays the report data from the first measurement and the second measurement in the report. I just want the report to display the data from the second (new) measurement.

  • #2

    please comply so we can help you better
    sigpiccall me "Plum Crazy"....but you only go around once!


    • #3
      Would IF/GOTO a label do what you need?
      <internet bumper sticker goes here>


      • #4
        No simple way

        I suspect this would require a BASIC script to change the feaure all back to their nominal values, as if the part were run off-line.t


        • #5
          Use and IF statement to see if the dimension is Out of Tolerance first. If it is set the output property of the dimension to NONE, it is In Tolerance then set it to BOTH.
          Mr. Comment
          SCIROCCO-NT 13-20-10
          B3C-LC Controller (Leitz Protocol), SP600M, TP200
          PCDMIS CAD++ v4.3 MR1(Build: 12/11/08)


          • #6
            I have the “if” statements to check if the dimensions are in/out of tolerance, but I don't what command/code to use set the output to "none" or "both".


            • #7
              does this help

              I don't know what to set the last value = ?(0 or 1 or ?)but this is the command for that field (see pic attached)
              Last edited by Mike N.; 05-17-2007, 09:56 AM.
              sigpiccall me "Plum Crazy"....but you only go around once!


              • #8
                Script maybe the only way to change that value?

                Option Explicit
                Private Sub Main()
                Dim DmisApp As Object
                Set DmisApp = CreateObject("PCDLRN.application")
                Dim DmisPart As Object
                Set DmisPart = DmisApp.ActivePartProgram
                Dim Cmds As Object
                Set Cmds = DmisPart.Commands
                Dim Cmd As Object
                Dim MyOutputType As String
                Dim ReturnVar1 As Boolean
                Dim MyFeatID As String
                MyFeatID = "LOC1"
                Set Cmd = Cmds.Item(MyFeatID)
                MyOutputType = "NONE"
                ReturnVar1 = Cmd.PutText(MyOutputType, OUTPUT_TYPE, 0)
                If ReturnVar1 = False Then
                    MsgBox "Macro failed to update dimension code."
                End If
                End Sub
                Hate to say this but, after stating what I did I couldnt figure out how to get PCDMIS to update that variable using PCDMIS code.

                The above code however can be executed using Basic Script editor to change the Dimension Output value. You will however have to figure out how to manage your flow control logic within PCDMIS to avoid infinite loops and such.

                I think that once PCDMIS updates the command it will delete it from the Report buffer. Unfortunately my free time at work is pretty well limited today to post a fully debugged version but I hope this will help you out, sorry. Good Luck.
                Mr. Comment
                SCIROCCO-NT 13-20-10
                B3C-LC Controller (Leitz Protocol), SP600M, TP200
                PCDMIS CAD++ v4.3 MR1(Build: 12/11/08)


                • #9
                  Ive setup simmilar programs where i output results to none then assign variable to check if dimension is out of spec using the ifgoto command, if all is well, jump to label and output results to printer by reporting again at the end of program, if there are errors loop back to another label and re-do the measurements. It can get confusing if you are checking against more than 1 dim thou. i have found this method worked well for me, sorry but i cant find an example to post which would clarify.
                  Xcel 12-20-10
                  Pcdmis Cad++ Ver 3.7 Mr3


                  • #10
                    TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=0
                    PNT1 =FEAT/POINT,RECT
                    ASSIGN/V1 = "BOTH"
                    DIM LOC1= LOCATION OF POINT PNT1 UNITS=MM ,$
                    GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=V1
                    AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
                    X 0.000 0.010 0.010 0.000 0.000 0.000 ----#----
                    END OF DIMENSION LOC1
                    Wow, what a difference sleep makes..

                    I woke up this morning and I thought of a way that you can change that pesky OUTPUT variable without using a VB Script. I was like so, duhhh! Anyway since the bozos at Wilcox choose not to give you a way to assign the OUTPUT_TYPE directly you can however replace OUTPUT_TYPE with your own assignment variable like I have shown above.

                    If you dont want that Dimension to report just assign V1="NONE" if you do then ASSIGN it a value of "BOTH". Keep in mind though if you change the Dimension Output to BOTH after the fact your still going to have to rerun that Dimension command using some flow control commands so that it will show up in the report.
                    Mr. Comment
                    SCIROCCO-NT 13-20-10
                    B3C-LC Controller (Leitz Protocol), SP600M, TP200
                    PCDMIS CAD++ v4.3 MR1(Build: 12/11/08)


                    • #11
                      Thanks for your help. I'll give that a try.


                      • #12
                        This is sort of an extension of what was originally asked.

                        Is there anyway to "force" a new report with either "print this current report" or "clear the current report" options before starting the new report?
                        Links to my utilities for PCDMIS


                        • #13
                          Thanks MrComment!

                          I got it to work using your suggestions!


                          Related Topics