hexagon logo

Export generic .txt not showing all dimensions. PC-DMIS 2022.1

Hi, im using PC-DMIS 2022.1 SP4. Generating generic txt file with dimensions only shows simple dimensions like distances. Dimensions like positions, that have from with it are not showed when i export them with export -> generic -> txt. Why ?

Parents
  • Generic exports only support legacy dimensions, geometric tolerance commands do not support any type of plain-text output.

  • Hi Neil. This doesn't seem to be right. In reporting option there is Output -> Report and statistics -> There i can choose Both or Stats.
    Exporting .txt by generic option was working fine with PC-DMIS 2017 R1 that we also use. In newer version the same option of raporting and exporting seems to not work correctly. 

  • in 2017 R1 you did not have GeoTolerance commands, so all your reporting was as Neil said above in "Legacy". Where starting in 2020.2 they introduced GeoTol. Seeing as you have 2022.1, you have GeoTolerance now. There are ways to export the dimensions you seek with scripts and possibly other methods.

    Or you can simply go to Insert > DImension > Legacy dimensions to report the way you used to for GD&T

  • In 2017 there is XactMeasure GD&T, different option then legacy dimensions and still it was working well with exporting generic. No idea why they had to delete this in newer versions, just stupid.

    Either way. Thanks for response

  • Textual reporting / textual exports of XactMeasure commands were not fully supported either - they only exported the first feature of the first segment.  This means that is you had position of a pattern of holes or if you had a composite position or profile dimension, there would be data missing.

  • You can use something like this for reporting.

    Sub Main()
      ' writes Dimension-data To excel sheet
      ' the excel sheet must be saved manually
      ' SCRIPT IS Not 100% COMPLETE. MODIFIED ONLY WHAT WAS NEEDED #####################################################
      ' Dim Something
        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 pcDMISDIMCmd As Object
      
        Dim objExcel As Object
        Dim objNewBook As Object
        
        Set objExcel = CreateObject("Excel.Application")
        Set objNewBook = objExcel.Workbooks.Add
        
        Dim sPath, sTemp, sTemp2 As String
        Dim iRowCount, iIndex, iType As Integer
        Dim dMeas, dTol, dMin, dMax, dDev, dNominal As Double
    
      ' Write excel heading
        objExcel.ScreenUpdating = False
        objNewBook.Sheets(1).Cells(1, 1).Value = "ID"
        objNewBook.Sheets(1).Cells(1, 2).Value = "Ref"
        objNewBook.Sheets(1).Cells(1, 3).Value = "AxisLetter"
        objNewBook.Sheets(1).Cells(1, 4).Value = "Nominal"    
        objNewBook.Sheets(1).Cells(1, 5).Value = "Measured"
        objNewBook.Sheets(1).Cells(1, 6).Value = "Plus"
        objNewBook.Sheets(1).Cells(1, 7).Value = "Minus"
        objNewBook.Sheets(1).Cells(1, 8).Value = "OutTol"
        objNewBook.Sheets(1).Cells(1, 9).Value = "Length"
        objNewBook.Sheets(1).Cells(1, 10).Value = "Deviation"
        objNewBook.Sheets(1).Cells(1, 11).Value = "Max"
        objNewBook.Sheets(1).Cells(1, 12).Value = "Min"
        objNewBook.Sheets(1).Cells(1, 13).Value = "X Geo Pos"
        objNewBook.Sheets(1).Cells(1, 14).Value = "Y Geo Pos"
        objNewBook.Sheets(1).Cells(1, 15).Value = "Z Geo Pos"
        objNewBook.Sheets(1).Cells(1, 16).Value = "Bonus"
        objNewBook.Sheets(1).Cells(1, 17).Value = "Units"
        objNewBook.Sheets(1).Cells(1, 18).Value = "Standard"
    
        objNewBook.Sheets(1).Range("C2:S500").NumberFormat = "0.0000"
        objNewBook.Sheets(1).Columns.ColumnWidth = 10
    
      ' search pcDMIS For Dimension command
        iRowCount = 2
        For Each pcDMISCmd In pcDMISCmds
          ' ### Get Command Type ###################################################
            iType = -1
            If (pcDMISCmd.IsDimension) Then iType = 1
            If (pcDMISCmd.Type = FEATURE_CONTROL_FRAME) Then iType = 2
            If (pcDMISCmd.Type = ISO_TOLERANCE_COMMAND) Or (pcDMISCmd.Type = ASME_TOLERANCE_COMMAND) Then iType = 3
            If (pcDMISCmd.Type = ISO_SIZE_COMMAND) Or (pcDMISCmd.Type = ASME_SIZE_COMMAND) Then iType = 4
            If iType = -1 Then GoTo nextLoopIndex
          
          ' ### Select Type ###################################################
            Select Case iType
              Case 1 'Dimension
                  If pcDMISCmd.Type = DATDEF_COMMAND Then GoTo nextLoopIndex
                  If pcDMISCmd.GetText(ID, 0) <> "" Then
                    If (pcDMISCmd.GetText(REF_ID, 2) <> pcDMISCmd.GetText(REF_ID, 1)) Then
                      sTemp = pcDMISCmd.GetText(ID, 0)
                      sTemp2 = pcDMISCmd.GetText(REF_ID, 1) + "; " + pcDMISCmd.GetText(REF_ID, 2)
                    Else
                      sTemp = pcDMISCmd.GetText(ID, 0)
                      sTemp2 = pcDMISCmd.GetText(REF_ID, 0)
                    End If
                  End If
    
                  If pcDMISCmd.Type = DIMENSION_START_LOCATION Then GoTo nextLoopIndex
                  If pcDMISCmd.Type = DIMENSION_END_LOCATION Then GoTo nextLoopIndex
                  If pcDMISCmd.Type = DIMENSION_START_LOCATION Then
                    sTemp = pcDMISCmd.GetText(ID, 0)
                    sTemp2 = pcDMISCmd.GetText(REF_ID, 0)
                    GoTo nextLoopIndex
                  End If
                  
                ' Get DimensionCommand
                  Set pcDMISDIMCmd = pcDMISCmd.DimensionCommand
              
                ' Write DimensionCommand data To Excel
                  objNewBook.Sheets(1).Cells(iRowCount, 1).Value = sTemp 'ID
                  objNewBook.Sheets(1).Cells(iRowCount, 2).Value = sTemp2 'ref-Feature ID
                  objNewBook.Sheets(1).Cells(iRowCount, 3).Value = pcDMISDIMCmd.AxisLetter
                  objNewBook.Sheets(1).Cells(iRowCount, 4).Value = pcDMISDIMCmd.Nominal
                  objNewBook.Sheets(1).Cells(iRowCount, 5).Value = pcDMISDIMCmd.Measured
                  objNewBook.Sheets(1).Cells(iRowCount, 6).Value = pcDMISDIMCmd.Plus
                  objNewBook.Sheets(1).Cells(iRowCount, 7).Value = pcDMISDIMCmd.Minus
                  objNewBook.Sheets(1).Cells(iRowCount, 8).Value = pcDMISDIMCmd.OutTol
                  objNewBook.Sheets(1).Cells(iRowCount, 9).Value = pcDMISDIMCmd.Length
                  objNewBook.Sheets(1).Cells(iRowCount, 10).Value = pcDMISDIMCmd.Deviation
                  objNewBook.Sheets(1).Cells(iRowCount, 11).Value = pcDMISDIMCmd.Max
                  objNewBook.Sheets(1).Cells(iRowCount, 12).Value = pcDMISDIMCmd.Min
                  objNewBook.Sheets(1).Cells(iRowCount, 16).Value = pcDMISDIMCmd.Bonus
                  If pcDMISDIMCmd.Units = 1 Then
                    objNewBook.Sheets(1).Cells(iRowCount, 17).Value = "MM"
                  Else
                    objNewBook.Sheets(1).Cells(iRowCount, 17).Value = "INCH"
                  End If
                  objNewBook.Sheets(1).Cells(iRowCount, 18).Value = ""
                  
                ' new Excel row
                  iRowCount = iRowCount + 1
                  
              Case 2 'FCF
                ' Write ExMeas-Command data To Excel
                  iIndex = 1
                  sTemp = pcDMISCmd.GetText(LINE2_FEATNAME, iIndex)
                  Do While sTemp <> ""
                
                    dMeas = pcDMISCmd.GetText(LINE2_MEAS, iIndex)
                    dDev = pcDMISCmd.GetText(LINE2_DEV, iIndex)
                    dNominal = pcDMISCmd.GetText(LINE2_NOMINAL, iIndex)
                    dMax = pcDMISCmd.GetText(LINE2_MAX, iIndex)
                    dMin = pcDMISCmd.GetText(LINE2_MIN, iIndex)
    
    
    
                    objNewBook.Sheets(1).Cells(iRowCount, 1).Value = pcDMISCmd.ID
                    objNewBook.Sheets(1).Cells(iRowCount, 2).Value = sTemp
                    objNewBook.Sheets(1).Cells(iRowCount, 3).Value = "FCF"  'AxisLetter
                    objNewBook.Sheets(1).Cells(iRowCount, 4).Value = dNominal 'Nominal
                    objNewBook.Sheets(1).Cells(iRowCount, 5).Value = dMeas 'Measured
                    objNewBook.Sheets(1).Cells(iRowCount, 6).Value = pcDMISCmd.GetText(LINE2_PLUSTOL, iIndex)   'Plus
                    objNewBook.Sheets(1).Cells(iRowCount, 7).Value = pcDMISCmd.GetText(LINE2_MINUSTOL, iIndex)  'Minus
                    objNewBook.Sheets(1).Cells(iRowCount, 8).Value = pcDMISCmd.GetText(LINE2_OUTTOL, iIndex)  'OutTol
                    objNewBook.Sheets(1).Cells(iRowCount, 9).Value = pcDMISCmd.GetText(MEAS_LENGTH, iIndex)   'Length
                    objNewBook.Sheets(1).Cells(iRowCount, 10).Value = dDev 'Deviation
                    objNewBook.Sheets(1).Cells(iRowCount, 11).Value = dMax'Max
                    objNewBook.Sheets(1).Cells(iRowCount, 12).Value = dMin 'Min                
                    objNewBook.Sheets(1).Cells(iRowCount, 13).Value = pcDMISCmd.GetText(LINE2_MEAS_X, iIndex)  'X VALUE                
    	    objNewBook.Sheets(1).Cells(iRowCount, 14).Value = pcDMISCmd.GetText(LINE2_MEAS_Y, iIndex)  'Y VALUE                
                    objNewBook.Sheets(1).Cells(iRowCount, 15).Value = pcDMISCmd.GetText(LINE2_MEAS_Z, iIndex)  'Z VALUE
                    objNewBook.Sheets(1).Cells(iRowCount, 16).Value = pcDMISCmd.GetText(LINE2_BONUS, iIndex)  'Bonus
                    objNewBook.Sheets(1).Cells(iRowCount, 17).Value = pcDMISCmd.GetText(UNIT_TYPE, 0)  'Units
                    objNewBook.Sheets(1).Cells(iRowCount, 18).Value = pcDMISCmd.GetText(STANDARD, 0)
                    objNewBook.Sheets(1).Cells(iRowCount, 19).Value = pcDMISCmd.GetText(THEO_X, iIndex)  'Theoretical X VALUE
                    objNewBook.Sheets(1).Cells(iRowCount, 20).Value = pcDMISCmd.GetText(THEO_Y, iIndex)  'Theoretical Y VALUE
                    objNewBook.Sheets(1).Cells(iRowCount, 21).Value = pcDMISCmd.GetText(THEO_Z, iIndex)  'Theoretical Z VALUE
                    
              
                  ' new GeoTol Row
                    iIndex = iIndex + 1
                    sTemp = pcDMISCmd.GetText(LINE2_FEATNAME, iIndex)
                    
                  ' new Excel row
                    iRowCount = iRowCount + 1
                  Loop
                  
              Case 3 'GEO
                ' Write GeoTol-Command data To Excel
                  iIndex = 1
                  sTemp = pcDMISCmd.GetText(REF_ID, iIndex)
                  Do While sTemp <> ""
                    objNewBook.Sheets(1).Cells(iRowCount, 1).Value = pcDMISCmd.ID
                    objNewBook.Sheets(1).Cells(iRowCount, 2).Value = sTemp
                    objNewBook.Sheets(1).Cells(iRowCount, 3).Value = "GEO"  'AxisLetter
              
                    dTol = pcDMISCmd.GetText(FORM_TOLERANCE, 1)
                    dMeas = pcDMISCmd.GetTextEx(DIM_DEVIATION, iIndex, "SEG=1")
    
                    objNewBook.Sheets(1).Cells(iRowCount, 4).Value = pcDMISCmd.GetTextEx(NOMINAL, iIndex, "SEG=1")    'Nominal
                    objNewBook.Sheets(1).Cells(iRowCount, 5).Value = pcDMISCmd.GetTextEx(DIM_MEAS, iIndex, "SEG=1")  'Measured
                    objNewBook.Sheets(1).Cells(iRowCount, 6).Value = pcDMISCmd.GetTextEx(F_PLUS_TOL, iIndex, "SEG=1") 'Plus
                    objNewBook.Sheets(1).Cells(iRowCount, 7).Value = pcDMISCmd.GetTextEx(F_MINUS_TOL, iIndex, "SEG=1")  'Minus
                    If dMeas > dTol Then
                      objNewBook.Sheets(1).Cells(iRowCount, 8).Value = dTol - dMeas  'OutTol
                    Else
                      objNewBook.Sheets(1).Cells(iRowCount, 8).Value = 0  'OutTol
                    End If
                    objNewBook.Sheets(1).Cells(iRowCount, 9).Value = 0   'Length
                    objNewBook.Sheets(1).Cells(iRowCount, 10).Value = pcDMISCmd.GetTextEx(DIM_DEVIATION, iIndex, "SEG=1")  'Deviation
                    objNewBook.Sheets(1).Cells(iRowCount, 11).Value = pcDMISCmd.GetTextEx(DIM_MAX, iIndex, "SEG=1")  'Max
                    objNewBook.Sheets(1).Cells(iRowCount, 12).Value = pcDMISCmd.GetTextEx(DIM_MIN, iIndex, "SEG=1")  'Min
                    objNewBook.Sheets(1).Cells(iRowCount, 13).Value = pcDMISCmd.GetTextEx(MEAS_X, iIndex, "SEG=1")  'X VALUE
    	    objNewBook.Sheets(1).Cells(iRowCount, 14).Value = pcDMISCmd.GetTextEx(MEAS_Y, iIndex, "SEG=1")  'Y VALUE
                    objNewBook.Sheets(1).Cells(iRowCount, 15).Value = pcDMISCmd.GetTextEx(MEAS_Y, iIndex, "SEG=1")  'Z VALUE
                    objNewBook.Sheets(1).Cells(iRowCount, 16).Value = pcDMISCmd.GetTextEx(DIM_BONUS, iIndex, "SEG=1")  'Bonus
                    objNewBook.Sheets(1).Cells(iRowCount, 17).Value = pcDMISCmd.GetText(UNIT_TYPE, 0)   'Units
                    objNewBook.Sheets(1).Cells(iRowCount, 18).Value = pcDMISCmd.GetText(STANDARD, 0)   'STANDARD
              
                  ' new GeoTol Row
                    iIndex = iIndex + 1
                    sTemp = pcDMISCmd.GetText(REF_ID, iIndex)
                    
                  ' new Excel row
                    iRowCount = iRowCount + 1
                  Loop
                  
              Case 4 'Size
                ' Write ToleranceCommand data To Excel
                  objNewBook.Sheets(1).Cells(iRowCount, 1).Value = pcDMISCmd.GetText(ID, 0)
                  objNewBook.Sheets(1).Cells(iRowCount, 2).Value = pcDMISCmd.GetText(REF_ID, 0)
                  objNewBook.Sheets(1).Cells(iRowCount, 3).Value = "SIZE"          
                  objNewBook.Sheets(1).Cells(iRowCount, 4).Value = pcDMISCmd.GetText(Nominal, 0)   'Nominal
                  objNewBook.Sheets(1).Cells(iRowCount, 5).Value = CDbl(pcDMISCmd.GetText(Nominal, 0)) + CDbl(pcDMISCmd.GetText(DIM_DEVIATION, 0)) 'Measured
                  objNewBook.Sheets(1).Cells(iRowCount, 6).Value = pcDMISCmd.GetText(UPPER_TOLERANCE, 0)   'Plus
                  objNewBook.Sheets(1).Cells(iRowCount, 7).Value = pcDMISCmd.GetText(LOWER_TOLERANCE, 0)  'Minus
                  objNewBook.Sheets(1).Cells(iRowCount, 8).Value = 0    'OutTol
                  objNewBook.Sheets(1).Cells(iRowCount, 9).Value = 0   'Length
                  objNewBook.Sheets(1).Cells(iRowCount, 10).Value = pcDMISCmd.GetText(DIM_DEVIATION, 0)  'Deviation
                  objNewBook.Sheets(1).Cells(iRowCount, 11).Value = 0  'Max
                  objNewBook.Sheets(1).Cells(iRowCount, 12).Value = 0  'Min
                  objNewBook.Sheets(1).Cells(iRowCount, 16).Value = 0  'Bonus
                  objNewBook.Sheets(1).Cells(iRowCount, 17).Value = pcDMISCmd.GetText(UNIT_TYPE, 0) 'Units
                  objNewBook.Sheets(1).Cells(iRowCount, 18).Value = pcDMISCmd.GetText(STANDARD, 0)
              
                ' new Excel row
                  iRowCount = iRowCount + 1
                  
            End Select
          
    nextLoopIndex:
        Next pcDMISCmd
        
        
    
        
      ' Close excel
        objExcel.ScreenUpdating = True
        objExcel.Visible = True
        sPath = "C:\CMM\TEST.XLSX"
        'REMOVE Commented SaveAs and quit below to automatically save
        '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
    End Sub

    Here is an image of how it spits out into Excel.

Reply
  • You can use something like this for reporting.

    Sub Main()
      ' writes Dimension-data To excel sheet
      ' the excel sheet must be saved manually
      ' SCRIPT IS Not 100% COMPLETE. MODIFIED ONLY WHAT WAS NEEDED #####################################################
      ' Dim Something
        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 pcDMISDIMCmd As Object
      
        Dim objExcel As Object
        Dim objNewBook As Object
        
        Set objExcel = CreateObject("Excel.Application")
        Set objNewBook = objExcel.Workbooks.Add
        
        Dim sPath, sTemp, sTemp2 As String
        Dim iRowCount, iIndex, iType As Integer
        Dim dMeas, dTol, dMin, dMax, dDev, dNominal As Double
    
      ' Write excel heading
        objExcel.ScreenUpdating = False
        objNewBook.Sheets(1).Cells(1, 1).Value = "ID"
        objNewBook.Sheets(1).Cells(1, 2).Value = "Ref"
        objNewBook.Sheets(1).Cells(1, 3).Value = "AxisLetter"
        objNewBook.Sheets(1).Cells(1, 4).Value = "Nominal"    
        objNewBook.Sheets(1).Cells(1, 5).Value = "Measured"
        objNewBook.Sheets(1).Cells(1, 6).Value = "Plus"
        objNewBook.Sheets(1).Cells(1, 7).Value = "Minus"
        objNewBook.Sheets(1).Cells(1, 8).Value = "OutTol"
        objNewBook.Sheets(1).Cells(1, 9).Value = "Length"
        objNewBook.Sheets(1).Cells(1, 10).Value = "Deviation"
        objNewBook.Sheets(1).Cells(1, 11).Value = "Max"
        objNewBook.Sheets(1).Cells(1, 12).Value = "Min"
        objNewBook.Sheets(1).Cells(1, 13).Value = "X Geo Pos"
        objNewBook.Sheets(1).Cells(1, 14).Value = "Y Geo Pos"
        objNewBook.Sheets(1).Cells(1, 15).Value = "Z Geo Pos"
        objNewBook.Sheets(1).Cells(1, 16).Value = "Bonus"
        objNewBook.Sheets(1).Cells(1, 17).Value = "Units"
        objNewBook.Sheets(1).Cells(1, 18).Value = "Standard"
    
        objNewBook.Sheets(1).Range("C2:S500").NumberFormat = "0.0000"
        objNewBook.Sheets(1).Columns.ColumnWidth = 10
    
      ' search pcDMIS For Dimension command
        iRowCount = 2
        For Each pcDMISCmd In pcDMISCmds
          ' ### Get Command Type ###################################################
            iType = -1
            If (pcDMISCmd.IsDimension) Then iType = 1
            If (pcDMISCmd.Type = FEATURE_CONTROL_FRAME) Then iType = 2
            If (pcDMISCmd.Type = ISO_TOLERANCE_COMMAND) Or (pcDMISCmd.Type = ASME_TOLERANCE_COMMAND) Then iType = 3
            If (pcDMISCmd.Type = ISO_SIZE_COMMAND) Or (pcDMISCmd.Type = ASME_SIZE_COMMAND) Then iType = 4
            If iType = -1 Then GoTo nextLoopIndex
          
          ' ### Select Type ###################################################
            Select Case iType
              Case 1 'Dimension
                  If pcDMISCmd.Type = DATDEF_COMMAND Then GoTo nextLoopIndex
                  If pcDMISCmd.GetText(ID, 0) <> "" Then
                    If (pcDMISCmd.GetText(REF_ID, 2) <> pcDMISCmd.GetText(REF_ID, 1)) Then
                      sTemp = pcDMISCmd.GetText(ID, 0)
                      sTemp2 = pcDMISCmd.GetText(REF_ID, 1) + "; " + pcDMISCmd.GetText(REF_ID, 2)
                    Else
                      sTemp = pcDMISCmd.GetText(ID, 0)
                      sTemp2 = pcDMISCmd.GetText(REF_ID, 0)
                    End If
                  End If
    
                  If pcDMISCmd.Type = DIMENSION_START_LOCATION Then GoTo nextLoopIndex
                  If pcDMISCmd.Type = DIMENSION_END_LOCATION Then GoTo nextLoopIndex
                  If pcDMISCmd.Type = DIMENSION_START_LOCATION Then
                    sTemp = pcDMISCmd.GetText(ID, 0)
                    sTemp2 = pcDMISCmd.GetText(REF_ID, 0)
                    GoTo nextLoopIndex
                  End If
                  
                ' Get DimensionCommand
                  Set pcDMISDIMCmd = pcDMISCmd.DimensionCommand
              
                ' Write DimensionCommand data To Excel
                  objNewBook.Sheets(1).Cells(iRowCount, 1).Value = sTemp 'ID
                  objNewBook.Sheets(1).Cells(iRowCount, 2).Value = sTemp2 'ref-Feature ID
                  objNewBook.Sheets(1).Cells(iRowCount, 3).Value = pcDMISDIMCmd.AxisLetter
                  objNewBook.Sheets(1).Cells(iRowCount, 4).Value = pcDMISDIMCmd.Nominal
                  objNewBook.Sheets(1).Cells(iRowCount, 5).Value = pcDMISDIMCmd.Measured
                  objNewBook.Sheets(1).Cells(iRowCount, 6).Value = pcDMISDIMCmd.Plus
                  objNewBook.Sheets(1).Cells(iRowCount, 7).Value = pcDMISDIMCmd.Minus
                  objNewBook.Sheets(1).Cells(iRowCount, 8).Value = pcDMISDIMCmd.OutTol
                  objNewBook.Sheets(1).Cells(iRowCount, 9).Value = pcDMISDIMCmd.Length
                  objNewBook.Sheets(1).Cells(iRowCount, 10).Value = pcDMISDIMCmd.Deviation
                  objNewBook.Sheets(1).Cells(iRowCount, 11).Value = pcDMISDIMCmd.Max
                  objNewBook.Sheets(1).Cells(iRowCount, 12).Value = pcDMISDIMCmd.Min
                  objNewBook.Sheets(1).Cells(iRowCount, 16).Value = pcDMISDIMCmd.Bonus
                  If pcDMISDIMCmd.Units = 1 Then
                    objNewBook.Sheets(1).Cells(iRowCount, 17).Value = "MM"
                  Else
                    objNewBook.Sheets(1).Cells(iRowCount, 17).Value = "INCH"
                  End If
                  objNewBook.Sheets(1).Cells(iRowCount, 18).Value = ""
                  
                ' new Excel row
                  iRowCount = iRowCount + 1
                  
              Case 2 'FCF
                ' Write ExMeas-Command data To Excel
                  iIndex = 1
                  sTemp = pcDMISCmd.GetText(LINE2_FEATNAME, iIndex)
                  Do While sTemp <> ""
                
                    dMeas = pcDMISCmd.GetText(LINE2_MEAS, iIndex)
                    dDev = pcDMISCmd.GetText(LINE2_DEV, iIndex)
                    dNominal = pcDMISCmd.GetText(LINE2_NOMINAL, iIndex)
                    dMax = pcDMISCmd.GetText(LINE2_MAX, iIndex)
                    dMin = pcDMISCmd.GetText(LINE2_MIN, iIndex)
    
    
    
                    objNewBook.Sheets(1).Cells(iRowCount, 1).Value = pcDMISCmd.ID
                    objNewBook.Sheets(1).Cells(iRowCount, 2).Value = sTemp
                    objNewBook.Sheets(1).Cells(iRowCount, 3).Value = "FCF"  'AxisLetter
                    objNewBook.Sheets(1).Cells(iRowCount, 4).Value = dNominal 'Nominal
                    objNewBook.Sheets(1).Cells(iRowCount, 5).Value = dMeas 'Measured
                    objNewBook.Sheets(1).Cells(iRowCount, 6).Value = pcDMISCmd.GetText(LINE2_PLUSTOL, iIndex)   'Plus
                    objNewBook.Sheets(1).Cells(iRowCount, 7).Value = pcDMISCmd.GetText(LINE2_MINUSTOL, iIndex)  'Minus
                    objNewBook.Sheets(1).Cells(iRowCount, 8).Value = pcDMISCmd.GetText(LINE2_OUTTOL, iIndex)  'OutTol
                    objNewBook.Sheets(1).Cells(iRowCount, 9).Value = pcDMISCmd.GetText(MEAS_LENGTH, iIndex)   'Length
                    objNewBook.Sheets(1).Cells(iRowCount, 10).Value = dDev 'Deviation
                    objNewBook.Sheets(1).Cells(iRowCount, 11).Value = dMax'Max
                    objNewBook.Sheets(1).Cells(iRowCount, 12).Value = dMin 'Min                
                    objNewBook.Sheets(1).Cells(iRowCount, 13).Value = pcDMISCmd.GetText(LINE2_MEAS_X, iIndex)  'X VALUE                
    	    objNewBook.Sheets(1).Cells(iRowCount, 14).Value = pcDMISCmd.GetText(LINE2_MEAS_Y, iIndex)  'Y VALUE                
                    objNewBook.Sheets(1).Cells(iRowCount, 15).Value = pcDMISCmd.GetText(LINE2_MEAS_Z, iIndex)  'Z VALUE
                    objNewBook.Sheets(1).Cells(iRowCount, 16).Value = pcDMISCmd.GetText(LINE2_BONUS, iIndex)  'Bonus
                    objNewBook.Sheets(1).Cells(iRowCount, 17).Value = pcDMISCmd.GetText(UNIT_TYPE, 0)  'Units
                    objNewBook.Sheets(1).Cells(iRowCount, 18).Value = pcDMISCmd.GetText(STANDARD, 0)
                    objNewBook.Sheets(1).Cells(iRowCount, 19).Value = pcDMISCmd.GetText(THEO_X, iIndex)  'Theoretical X VALUE
                    objNewBook.Sheets(1).Cells(iRowCount, 20).Value = pcDMISCmd.GetText(THEO_Y, iIndex)  'Theoretical Y VALUE
                    objNewBook.Sheets(1).Cells(iRowCount, 21).Value = pcDMISCmd.GetText(THEO_Z, iIndex)  'Theoretical Z VALUE
                    
              
                  ' new GeoTol Row
                    iIndex = iIndex + 1
                    sTemp = pcDMISCmd.GetText(LINE2_FEATNAME, iIndex)
                    
                  ' new Excel row
                    iRowCount = iRowCount + 1
                  Loop
                  
              Case 3 'GEO
                ' Write GeoTol-Command data To Excel
                  iIndex = 1
                  sTemp = pcDMISCmd.GetText(REF_ID, iIndex)
                  Do While sTemp <> ""
                    objNewBook.Sheets(1).Cells(iRowCount, 1).Value = pcDMISCmd.ID
                    objNewBook.Sheets(1).Cells(iRowCount, 2).Value = sTemp
                    objNewBook.Sheets(1).Cells(iRowCount, 3).Value = "GEO"  'AxisLetter
              
                    dTol = pcDMISCmd.GetText(FORM_TOLERANCE, 1)
                    dMeas = pcDMISCmd.GetTextEx(DIM_DEVIATION, iIndex, "SEG=1")
    
                    objNewBook.Sheets(1).Cells(iRowCount, 4).Value = pcDMISCmd.GetTextEx(NOMINAL, iIndex, "SEG=1")    'Nominal
                    objNewBook.Sheets(1).Cells(iRowCount, 5).Value = pcDMISCmd.GetTextEx(DIM_MEAS, iIndex, "SEG=1")  'Measured
                    objNewBook.Sheets(1).Cells(iRowCount, 6).Value = pcDMISCmd.GetTextEx(F_PLUS_TOL, iIndex, "SEG=1") 'Plus
                    objNewBook.Sheets(1).Cells(iRowCount, 7).Value = pcDMISCmd.GetTextEx(F_MINUS_TOL, iIndex, "SEG=1")  'Minus
                    If dMeas > dTol Then
                      objNewBook.Sheets(1).Cells(iRowCount, 8).Value = dTol - dMeas  'OutTol
                    Else
                      objNewBook.Sheets(1).Cells(iRowCount, 8).Value = 0  'OutTol
                    End If
                    objNewBook.Sheets(1).Cells(iRowCount, 9).Value = 0   'Length
                    objNewBook.Sheets(1).Cells(iRowCount, 10).Value = pcDMISCmd.GetTextEx(DIM_DEVIATION, iIndex, "SEG=1")  'Deviation
                    objNewBook.Sheets(1).Cells(iRowCount, 11).Value = pcDMISCmd.GetTextEx(DIM_MAX, iIndex, "SEG=1")  'Max
                    objNewBook.Sheets(1).Cells(iRowCount, 12).Value = pcDMISCmd.GetTextEx(DIM_MIN, iIndex, "SEG=1")  'Min
                    objNewBook.Sheets(1).Cells(iRowCount, 13).Value = pcDMISCmd.GetTextEx(MEAS_X, iIndex, "SEG=1")  'X VALUE
    	    objNewBook.Sheets(1).Cells(iRowCount, 14).Value = pcDMISCmd.GetTextEx(MEAS_Y, iIndex, "SEG=1")  'Y VALUE
                    objNewBook.Sheets(1).Cells(iRowCount, 15).Value = pcDMISCmd.GetTextEx(MEAS_Y, iIndex, "SEG=1")  'Z VALUE
                    objNewBook.Sheets(1).Cells(iRowCount, 16).Value = pcDMISCmd.GetTextEx(DIM_BONUS, iIndex, "SEG=1")  'Bonus
                    objNewBook.Sheets(1).Cells(iRowCount, 17).Value = pcDMISCmd.GetText(UNIT_TYPE, 0)   'Units
                    objNewBook.Sheets(1).Cells(iRowCount, 18).Value = pcDMISCmd.GetText(STANDARD, 0)   'STANDARD
              
                  ' new GeoTol Row
                    iIndex = iIndex + 1
                    sTemp = pcDMISCmd.GetText(REF_ID, iIndex)
                    
                  ' new Excel row
                    iRowCount = iRowCount + 1
                  Loop
                  
              Case 4 'Size
                ' Write ToleranceCommand data To Excel
                  objNewBook.Sheets(1).Cells(iRowCount, 1).Value = pcDMISCmd.GetText(ID, 0)
                  objNewBook.Sheets(1).Cells(iRowCount, 2).Value = pcDMISCmd.GetText(REF_ID, 0)
                  objNewBook.Sheets(1).Cells(iRowCount, 3).Value = "SIZE"          
                  objNewBook.Sheets(1).Cells(iRowCount, 4).Value = pcDMISCmd.GetText(Nominal, 0)   'Nominal
                  objNewBook.Sheets(1).Cells(iRowCount, 5).Value = CDbl(pcDMISCmd.GetText(Nominal, 0)) + CDbl(pcDMISCmd.GetText(DIM_DEVIATION, 0)) 'Measured
                  objNewBook.Sheets(1).Cells(iRowCount, 6).Value = pcDMISCmd.GetText(UPPER_TOLERANCE, 0)   'Plus
                  objNewBook.Sheets(1).Cells(iRowCount, 7).Value = pcDMISCmd.GetText(LOWER_TOLERANCE, 0)  'Minus
                  objNewBook.Sheets(1).Cells(iRowCount, 8).Value = 0    'OutTol
                  objNewBook.Sheets(1).Cells(iRowCount, 9).Value = 0   'Length
                  objNewBook.Sheets(1).Cells(iRowCount, 10).Value = pcDMISCmd.GetText(DIM_DEVIATION, 0)  'Deviation
                  objNewBook.Sheets(1).Cells(iRowCount, 11).Value = 0  'Max
                  objNewBook.Sheets(1).Cells(iRowCount, 12).Value = 0  'Min
                  objNewBook.Sheets(1).Cells(iRowCount, 16).Value = 0  'Bonus
                  objNewBook.Sheets(1).Cells(iRowCount, 17).Value = pcDMISCmd.GetText(UNIT_TYPE, 0) 'Units
                  objNewBook.Sheets(1).Cells(iRowCount, 18).Value = pcDMISCmd.GetText(STANDARD, 0)
              
                ' new Excel row
                  iRowCount = iRowCount + 1
                  
            End Select
          
    nextLoopIndex:
        Next pcDMISCmd
        
        
    
        
      ' Close excel
        objExcel.ScreenUpdating = True
        objExcel.Visible = True
        sPath = "C:\CMM\TEST.XLSX"
        'REMOVE Commented SaveAs and quit below to automatically save
        '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
    End Sub

    Here is an image of how it spits out into Excel.

Children
No Data