hexagon logo

help:Using scripts to acquire FCF data

该脚本能够输出FCF数据;然而,作为一名质量控制专业人员,我不熟悉如何修改其代码以确保其输出完整的内容,包括位置公差、轮廓公差和XY信息。帮助。

谢谢。

Parents
  • Hi, I tested this, and it looks like adding these first 3 lines into Heading block for column headers of X, Y, and Z. Then the next 3 lines into Case3 Block should display X, Y, and Z values

    objNewBook.Sheets(1).Cells(1, 16).Value = "X" 'Column Header for X Value
    objNewBook.Sheets(1).Cells(1, 17).Value = "Y" 'Column Header for Y Value
    objNewBook.Sheets(1).Cells(1, 18).Value = "Z" 'Column Header for Z Value
    
    objNewBook.Sheets(1).Cells(iRowCount, 16).Value = pcDMISCmd.GetTextEx(MEAS_X, iIndex, "SEG=1") 'X Position Value
    objNewBook.Sheets(1).Cells(iRowCount, 17).Value = pcDMISCmd.GetTextEx(MEAS_Y, iIndex, "SEG=1") 'Y Position Value
    objNewBook.Sheets(1).Cells(iRowCount, 18).Value = pcDMISCmd.GetTextEx(MEAS_Z, iIndex, "SEG=1") 'Z Position Value

    I realized I did the GeoTol after posting this, so I will leave it there. Working on the FCF one when I can.

    I also found this thread.

    https://nexus.hexagon.com/community/public/pc-dmis/f/pc-dmis-code-samples/115299/pc-dmis-to-excel-through-pc-dmis-script

Reply
  • Hi, I tested this, and it looks like adding these first 3 lines into Heading block for column headers of X, Y, and Z. Then the next 3 lines into Case3 Block should display X, Y, and Z values

    objNewBook.Sheets(1).Cells(1, 16).Value = "X" 'Column Header for X Value
    objNewBook.Sheets(1).Cells(1, 17).Value = "Y" 'Column Header for Y Value
    objNewBook.Sheets(1).Cells(1, 18).Value = "Z" 'Column Header for Z Value
    
    objNewBook.Sheets(1).Cells(iRowCount, 16).Value = pcDMISCmd.GetTextEx(MEAS_X, iIndex, "SEG=1") 'X Position Value
    objNewBook.Sheets(1).Cells(iRowCount, 17).Value = pcDMISCmd.GetTextEx(MEAS_Y, iIndex, "SEG=1") 'Y Position Value
    objNewBook.Sheets(1).Cells(iRowCount, 18).Value = pcDMISCmd.GetTextEx(MEAS_Z, iIndex, "SEG=1") 'Z Position Value

    I realized I did the GeoTol after posting this, so I will leave it there. Working on the FCF one when I can.

    I also found this thread.

    https://nexus.hexagon.com/community/public/pc-dmis/f/pc-dmis-code-samples/115299/pc-dmis-to-excel-through-pc-dmis-script

Children