hexagon logo

Will this VBA script work inside PCDMIS for legacy, xactmeasure, and geotol outputs?

I need to customize a csv ouput of the dimension checks for pcmis.

I am off for a week so I can't test this code. Will this work in all the different type of ways to get an output(ie. legacy, xactmeasure, and geotol)?

I am only interested in the below values...thanks.

Sub pcdmis()

    Dim App As Object
    Set App = CreateObject("PCDLRN.Application")
    Dim PartProg As Object
    Set PartProg = App.ActivePartProgram
    Dim Cmds As Object
    Set Cmds = PartProg.Commands
    Dim Cmd As Object

    ' Loop through all the PCDMIS names labels
    For Each Cmd In Cmds
        
        ' Check if "CHECK" is in the string bc those are the dimensional checks
        If InStr(1, Cmd, "CHECK", vbTextCompare) > 0 Then    

             MsgBox Cmd.NOM
             MsgBox Cmd.MEAS
             MsgBox Cmd.Ptol
             MsgBox Cmd.Mtol
             MsgBox Cmd.DEV
             MsgBox Cmd.OUTTOL

        End If

    Next Cmd

End Sub

Parents Reply Children
No Data