V4.1 - Total Measured - OUT OF TOL like 3.7

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

  • V4.1 - Total Measured - OUT OF TOL like 3.7

    Is there a variable statment or something I can put in my program to show the "Total # of Measured Features" & the "Total # of Out of Tolerance" features on my report like V3.7 did automatically?
    sigpic
    Xcel 15-20-10 - PFXcel 7-6-5 - Merlin 11-11-7 - Romer Absolute 7525SI
    PCDMIS 2012
    Windows Office XP

  • #2
    If no one has an answer (aka it can not be done), then VB can do it. I'll wait to see if there is a conventional method as I do not know 4+ at all. If worst comes to worst it can be coded. Let's see if there is a 4+ way to do it first though.

    Craig
    <internet bumper sticker goes here>

    Comment


    • #3
      Via the reporting template would be a start. I have not had enough experience yet with the templates I don't have a solution. Sorry
      sigpic

      James Mannes

      Comment


      • #4
        I asked the same thing to tech support,they said that it couldnt be done.

        Comment


        • #5
          This should do it but I have not run it. I took that outtol.bas and changed it a little. I do not know who originally authored that bas, it is from Wilcox's site. You'll need a variable in your PCDMIS part program called NUMBEROUTTOL and one called TOTALMEASURED. NUMBEROUTTOL is the number out of tolerance and TOTALMEASURED is the total dimensions reported. Like I said I have not even run this so I have no idea what any pitfalls may be. It will not work on 3.2063 that I do know. 3.2063 does not support GetVariableValue and SetVariableValue. If you want to run it on that you'll need to write the info to a text file with the bas and read it in with PCDMIS.

          Code:
          Sub Main()
          
          'this *.bas is a simple, modified version of the outtol.bas whose author I do not know
          'if any one knows the author credit them here
          '
          'craig
          
          Dim objApp As Object
          Set objApp = CreateObject("PCDLRN.Application")
          Dim objPart As Object
          Set objPart = objApp.ActivePartProgram
          Dim objCmds As Object
          Set objCmds = objPart.Commands
          Dim objCmd As Object
          Dim objDimCmd As Object
          Dim dblOutTol As Long
          dblOutTol = 0
          Dim dblTotalMeas As Long
          dblTotalMeas = 0
          Dim objOutTol As Object
          Set objOutTol = objPart.GetVariableValue("NUMBEROUTTOL")
          Dim objTotalMeas As Object
          Set objTotalMeas = objPart.GetVariableValue("TOTALMEASURED")
          
          For Each objCmd In objCmds
              If objCmd.IsDimension Then
                  If objCmd.Type <> DIMENSION_START_LOCATION And _
                     objCmd.Type <> DIMENSION_END_LOCATION And _
                     objCmd.Type <> DIMENSION_TRUE_START_POSITION And _
                     objCmd.Type <> DIMENSION_TRUE_END_POSITION Then
                      Set objDimCmd = objCmd.DimensionCommandlng
                      dblTotalMeas = dblTotalMeas + 1
                      If objDimCmd.OutTol > 0 Then
                          dblOutTol = dblOutTol + 1
                      End If
                  End If
              End If
          Next objCmd
          
          objOutTol.DoubleValue = dblOutTol
          objTotalMeas.DoubleValue = dblTotalMeas
          objPart.SetVariableValue "NUMBEROUTTOL", objOutTol
          objPart.SetVariableValue "TOTALMEASURED", objTotalMeas
          
          End Sub
          Craig
          Last edited by craiger_ny; 11-15-2006, 03:34 PM.
          <internet bumper sticker goes here>

          Comment


          • #6
            Hmmmm...

            I just noticed that in the text window of my CMM program that the information I'm trying to get to my report is already there. See picture below...

            http://i76.photobucket.com/albums/j2...untitled-1.jpg

            There's gotta be a way to get that into my report window. Maybe I should just go back to 3.7Mr3 until 4.2 is released . . .
            sigpic
            Xcel 15-20-10 - PFXcel 7-6-5 - Merlin 11-11-7 - Romer Absolute 7525SI
            PCDMIS 2012
            Windows Office XP

            Comment


            • #7
              So many things lost when they dumped Full Report Mode..... When it comes back I will use the new version.
              Lately, it occurs to me
              What a long, strange trip it's been.

              2017 R1 (Offline programming)

              Comment


              • #8
                You should be able to do this with reporting expressions by adding in the following code into a Text object's text property or inside of a GridControlObject's cell:

                =NUMMEAS()
                =NUMOUTTOL()
                Jared Hess - Techwriter @ WAI
                [View Reporting Tutorials Here]

                Comment


                • #9
                  Originally posted by JaredHess View Post
                  You should be able to do this with reporting expressions by adding in the following code into a Text object's text property or inside of a GridControlObject's cell:

                  =NUMMEAS()
                  =NUMOUTTOL()
                  I'll give it a shot but I haven't played with any of these features yet and I haven't been to the 4.1 upgrade class yet (hopefully the middle of January)... Who knows, maybe I'll break something playing around and I'll get a short work-week out of it (hasn't happened in the ten years I've been doing this).
                  sigpic
                  Xcel 15-20-10 - PFXcel 7-6-5 - Merlin 11-11-7 - Romer Absolute 7525SI
                  PCDMIS 2012
                  Windows Office XP

                  Comment

                  Related Topics

                  Collapse

                  Working...
                  X