Counting Dimensions out of Tolerance

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

  • Counting Dimensions out of Tolerance

    Does anyone know a way to count all the dimensions that are out of tolerance in a PC-DMIS app?

    I have tried the following V. B. (found on Wilkox site):

    Set App = CreateObject("PCDLRN.Application")

    Set Part = App.ActivePartProgram

    Set Cmds = Part.Commands

    For Each Cmd In Cmds
    If Cmd.IsDimension Then
    ...
    Set DimCmd = Cmd.DimensionCommand

    If DimCmd.OutTol > 0 Then
    NumberOut = NumberOut + 1
    Else
    NumberIn = NumberIn + 1
    End If
    ...

    The problem is, this does not handle dimensions that are stored in arrays, which we use a lot of. Many of the features we are measuring are placed at periodic angles, and we measure them in a loop which creates arrays of the dimensions which cannot be accessed using the above code.

    Any help would be greatly appreciated.

  • #2
    Originally posted by DanaCremer View Post
    Does anyone know a way to count all the dimensions that are out of tolerance in a PC-DMIS app?

    I have tried the following V. B. (found on Wilkox site):

    Set App = CreateObject("PCDLRN.Application")

    Set Part = App.ActivePartProgram

    Set Cmds = Part.Commands

    For Each Cmd In Cmds
    If Cmd.IsDimension Then
    ...
    Set DimCmd = Cmd.DimensionCommand

    If DimCmd.OutTol > 0 Then
    NumberOut = NumberOut + 1
    Else
    NumberIn = NumberIn + 1
    End If
    ...

    The problem is, this does not handle dimensions that are stored in arrays, which we use a lot of. Many of the features we are measuring are placed at periodic angles, and we measure them in a loop which creates arrays of the dimensions which cannot be accessed using the above code.

    Any help would be greatly appreciated.
    It would make the program longer, but you could use COPY/Paste with pattern instead of the loops, then you won't have any arrays.
    sigpic
    Originally posted by AndersI
    I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

    Comment


    • #3
      What version are you using? v3.7 should have the # Out of tol at the footer. v4.0+ you will have to edit the reports to show.
      I used to be high on life but I built up a tolerance.

      Brown & Sharpe Global Advantage
      PCDMIS CAD++ v2011mr2
      PH10MQ/SP600M


      sigpic

      Comment


      • #4
        On our versions of 3.5, in report mode, we have total # out-of-tolerance as the last thing reported.

        Comment


        • #5
          I appreciate the advice, but unfortunately, I need more than just the number of dimensions that are out of tolerance. For instance, I need to report the number of 'Warnings' (which by our definition are dimensions that use more than 70% of the tolerance).

          I am very reluctant to give up using loops and arrays, since in many of our programs, that would require up to 36 copies of the same block of code (something that would be considered ludicrous in any other language).

          Isn't there any way in PC-DMIS to take advantage of the most basic of data structures (arrays)?

          Comment


          • #6
            Originally posted by DanaCremer View Post
            I appreciate the advice, but unfortunately, I need more than just the number of dimensions that are out of tolerance. For instance, I need to report the number of 'Warnings' (which by our definition are dimensions that use more than 70% of the tolerance).

            I am very reluctant to give up using loops and arrays, since in many of our programs, that would require up to 36 copies of the same block of code (something that would be considered ludicrous in any other language).

            Isn't there any way in PC-DMIS to take advantage of the most basic of data structures (arrays)?

            I'm not sure exactly how 3.7 works with % of tolerance but in v4.1 you can right click the report window and define this.
            I used to be high on life but I built up a tolerance.

            Brown & Sharpe Global Advantage
            PCDMIS CAD++ v2011mr2
            PH10MQ/SP600M


            sigpic

            Comment

            Related Topics

            Collapse

            Working...
            X