Accessing FCF True Position in VB

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

  • Accessing FCF True Position in VB

    Hello,

    Does anyone know the commands to access the True Position Measured values using VB? The typical "Commands.DimensionCommands.Measured" does not apply to TP. I am writing a new macro for Excel to import data from PC-DMIS. All of the current examples only refer to location type dimensions. Also, please advise if there is a better place to post this.

    Thanks!

    t.
    Global Image 555
    PH10M-TP200
    PC-DMIS Cad ++
    Win7 64 bit
    V2014.1

  • #2
    Perhaps .DEV?
    <internet bumper sticker goes here>

    Comment


    • #3
      Tp

      Try this! I think this is what your asking for.

      cmd.DimensionCommand.Deviation
      cmd.DimensionCommand.Bonus

      Bill

      Comment


      • #4
        Returns object variable or with block variable not set. I think it has something to do with the new way (v4.0 and up) in which TP is calculated in a set of features. It is almost like once the dimension is found you have to loop through all of the elements withing that tp set to get to the individual tp deviations.
        Global Image 555
        PH10M-TP200
        PC-DMIS Cad ++
        Win7 64 bit
        V2014.1

        Comment


        • #5
          I suppose I could try going back to legacy dimensions. Then I could probable use the standard commands to retrieve the deviation. Just thinking out loud.

          t.
          Global Image 555
          PH10M-TP200
          PC-DMIS Cad ++
          Win7 64 bit
          V2014.1

          Comment


          • #6
            Just looking though the Object browser have your tried using the

            "DimensionCmd" Class?

            The members of this class look like they are all about GD&T.
            Mr. Comment
            SCIROCCO-NT 13-20-10
            B3C-LC Controller (Leitz Protocol), SP600M, TP200
            PCDMIS CAD++ v4.3 MR1(Build: 12/11/08)
            sigpic

            Comment


            • #7
              Originally posted by MrComment View Post
              Just looking though the Object browser have your tried using the

              "DimensionCmd" Class?

              The members of this class look like they are all about GD&T.

              Yes - I get the all too familiar "object doesn't support this property of method" Sample code follows...

              Private Sub CommandButton1_Click()
              Dim app As Object, cmds As Object, Cmd As Object, part As Object, PartProgram As Object
              Set app = CreateObject("PCDLRN.Application")
              Set part = app.ActivePartProgram
              Set cmds = part.Commands

              Dim irow As Integer, icol As Integer, currentcol As Integer
              Dim s As String
              s = ""
              irow = 10
              icol = ActiveSheet.Cells(2, 14)
              currentcol = icol + 4

              For Each Cmd In cmds
              ActiveSheet.Cells(irow, 16) = Cmd.ID
              ActiveSheet.Cells(irow, 17) = Cmd.Type
              ActiveSheet.Cells(irow, 18) = Cmd.TypeDescription
              If Cmd.Type = 184 Then ' Its a TP Dimension
              ActiveSheet.Cells(irow, currentcol) = part.DimensionCmd.Measured

              ElseIf Cmd.Type = DIMENSION_X_LOCATION Or Cmd.Type = DIMENSION_Y_LOCATION Or Cmd.Type = DIMENSION_Z_LOCATION Then
              ActiveSheet.Cells(irow, currentcol) = Cmd.DimensionCommand.Measured
              End If
              irow = irow + 1
              Next Cmd
              icol = icol + 1
              ActiveSheet.Cells(2, 14) = icol
              End Sub

              *** Also tried Cmd.DimensionCmd.Measured
              Last edited by dtmtim; 02-09-2007, 05:03 PM. Reason: Content
              Global Image 555
              PH10M-TP200
              PC-DMIS Cad ++
              Win7 64 bit
              V2014.1

              Comment

              Related Topics

              Collapse

              Working...
              X