hexagon logo

Results from 2 programs

Hello all,
Very general question.
Is anyone aware of a program that would compare the results of 2 identical
programs and show the individual point deviations in an excel file.
Example--first program would be a best fit.
2nd program would be a final.

Programs would be identical in the sense that the theoretical point locations
would be the same in both programs, but the alignments would
be different in the first and 2nd programs.

Thanks to everyone for any help offered.

Parents
  • Hello,

    the formula calculates the T_Value. But my math isn't good enough right now to determine if the value is positive or negative
    (it's only positive right now, the vector direction is ignored, this is just the length)

      ' writes all pointdata to excel sheet
      ' the excel sheet must be saved manually
     
      ' Dim Something
        Const cPointName = "PT_"
     
        Dim pcDMISApp As Object
        Set pcDMISApp = CreateObject("PCDLRN.Application")
        Dim pcDMISPart As Object
        Set pcDMISPart = pcDMISApp.ActivePartProgram
        Dim pcDMISCmds As Object
        Set pcDMISCmds = pcDMISPart.Commands
        Dim pcDMISCmd As Object
     
        Dim objExcel As Object
        Dim objNewBook As Object
        Dim objSheet As Object
        
        Set objExcel = CreateObject("Excel.Application")
        Set objNewBook = objExcel.Workbooks.Add
        
        'Dim ExcelSheet As Object
        'Set ExcelSheet = CreateObject("Excel.Sheet")
        
        objExcel.ScreenUpdating = False
        objNewBook.Sheets(1).Cells(1, 1).Value = "name"
        objNewBook.Sheets(1).Cells(1, 2).Value = "X-Value"
        objNewBook.Sheets(1).Cells(1, 3).Value = "Y-Value"
        objNewBook.Sheets(1).Cells(1, 4).Value = "Z-Value"
        objNewBook.Sheets(1).Cells(1, 5).Value = "T-Value"
    
        Dim sPath As String
        Dim iCount As Integer
        Dim dTValue As Double
        Dim retval
        Dim vTX, vTY, vTZ, vMX, vMY, vMZ As Double
        
    
      ' search pcDMIS
        iCount = 2
        
        For Each pcDMISCmd In pcDMISCmds
          If pcDMISCmd.Type = 602 Then 'CONTACT_VECTOR_POINT_FEATURE = 602
            If InStr(1, pcDMISCmd.ID, cPointName) > 0 Then
              objNewBook.Sheets(1).Cells(iCount, 1).Value = pcDMISCmd.ID
              vTX = pcDMISCmd.GetText(THEO_X, 0)
              vTY = pcDMISCmd.GetText(THEO_Y, 0)
              vTZ = pcDMISCmd.GetText(THEO_Z, 0)
              vMX = pcDMISCmd.GetText(MEAS_X, 0)
              vMY = pcDMISCmd.GetText(MEAS_Y, 0)
              vMZ = pcDMISCmd.GetText(MEAS_Z, 0)
              objNewBook.Sheets(1).Cells(iCount, 2).Value = vMX
              objNewBook.Sheets(1).Cells(iCount, 3).Value = vMY
              objNewBook.Sheets(1).Cells(iCount, 4).Value = vMZ
              objNewBook.Sheets(1).Cells(iCount, 5).Value = Sqr(((vTX - vMX) ^ 2) + ((vTY - vMY) ^ 2) + ((vTZ - vMZ) ^ 2))
              
              iCount = iCount + 1
            End If
          End If
        Next pcDMISCmd
        
     
      ' close excel
        objExcel.ScreenUpdating = True
        objExcel.Visible = True
        sPath = "C:\Users\qs\Desktop\TEST.XLSX"
        'objNewBook.SaveAs sPath
        'objExcel.Quit
    
      ' unDim Something
        Set objNewBook = Nothing
        Set objExcel = Nothing
        Set pcDMISCmd = Nothing
        Set pcDMISCmds = Nothing
        Set pcDMISPart = Nothing
        Set pcDMISApp = Nothing​
    
Reply
  • Hello,

    the formula calculates the T_Value. But my math isn't good enough right now to determine if the value is positive or negative
    (it's only positive right now, the vector direction is ignored, this is just the length)

      ' writes all pointdata to excel sheet
      ' the excel sheet must be saved manually
     
      ' Dim Something
        Const cPointName = "PT_"
     
        Dim pcDMISApp As Object
        Set pcDMISApp = CreateObject("PCDLRN.Application")
        Dim pcDMISPart As Object
        Set pcDMISPart = pcDMISApp.ActivePartProgram
        Dim pcDMISCmds As Object
        Set pcDMISCmds = pcDMISPart.Commands
        Dim pcDMISCmd As Object
     
        Dim objExcel As Object
        Dim objNewBook As Object
        Dim objSheet As Object
        
        Set objExcel = CreateObject("Excel.Application")
        Set objNewBook = objExcel.Workbooks.Add
        
        'Dim ExcelSheet As Object
        'Set ExcelSheet = CreateObject("Excel.Sheet")
        
        objExcel.ScreenUpdating = False
        objNewBook.Sheets(1).Cells(1, 1).Value = "name"
        objNewBook.Sheets(1).Cells(1, 2).Value = "X-Value"
        objNewBook.Sheets(1).Cells(1, 3).Value = "Y-Value"
        objNewBook.Sheets(1).Cells(1, 4).Value = "Z-Value"
        objNewBook.Sheets(1).Cells(1, 5).Value = "T-Value"
    
        Dim sPath As String
        Dim iCount As Integer
        Dim dTValue As Double
        Dim retval
        Dim vTX, vTY, vTZ, vMX, vMY, vMZ As Double
        
    
      ' search pcDMIS
        iCount = 2
        
        For Each pcDMISCmd In pcDMISCmds
          If pcDMISCmd.Type = 602 Then 'CONTACT_VECTOR_POINT_FEATURE = 602
            If InStr(1, pcDMISCmd.ID, cPointName) > 0 Then
              objNewBook.Sheets(1).Cells(iCount, 1).Value = pcDMISCmd.ID
              vTX = pcDMISCmd.GetText(THEO_X, 0)
              vTY = pcDMISCmd.GetText(THEO_Y, 0)
              vTZ = pcDMISCmd.GetText(THEO_Z, 0)
              vMX = pcDMISCmd.GetText(MEAS_X, 0)
              vMY = pcDMISCmd.GetText(MEAS_Y, 0)
              vMZ = pcDMISCmd.GetText(MEAS_Z, 0)
              objNewBook.Sheets(1).Cells(iCount, 2).Value = vMX
              objNewBook.Sheets(1).Cells(iCount, 3).Value = vMY
              objNewBook.Sheets(1).Cells(iCount, 4).Value = vMZ
              objNewBook.Sheets(1).Cells(iCount, 5).Value = Sqr(((vTX - vMX) ^ 2) + ((vTY - vMY) ^ 2) + ((vTZ - vMZ) ^ 2))
              
              iCount = iCount + 1
            End If
          End If
        Next pcDMISCmd
        
     
      ' close excel
        objExcel.ScreenUpdating = True
        objExcel.Visible = True
        sPath = "C:\Users\qs\Desktop\TEST.XLSX"
        'objNewBook.SaveAs sPath
        'objExcel.Quit
    
      ' unDim Something
        Set objNewBook = Nothing
        Set objExcel = Nothing
        Set pcDMISCmd = Nothing
        Set pcDMISCmds = Nothing
        Set pcDMISPart = Nothing
        Set pcDMISApp = Nothing​
    
Children
No Data