Your Products have been synced, click here to refresh
Sub Main() 'Declares PC-DMIS As the Active Program/Application Dim PCDApp As Object Dim Part As Object Dim Cmds As Object Dim Cmd As Object Dim TCmd As Object Dim TCmds As Object Set PCDApp = CreateObject("PCDLRN.Application") Set Part = PCDApp.ActivePartProgram Set Cmds = Part.Commands Dim VSERIALNUMBER As String For Each Cmd In Cmds If Cmd.IsTraceField Then If Cmd.GetText(TRACE_NAME, 0) = "Serial Number" Then VSERIALNUMBER = Cmd.GetText(TRACE_VALUE, 0) MsgBox VSERIALNUMBER End If End If Next Cmd End Sub
Sub Main() 'Declares PC-DMIS As the Active Program/Application Dim PCDApp As Object Dim Part As Object Dim Cmds As Object Dim Cmd As Object Dim TCmd As Object Dim TCmds As Object Set PCDApp = CreateObject("PCDLRN.Application") Set Part = PCDApp.ActivePartProgram Set Cmds = Part.Commands Dim VSERIALNUMBER As String For Each Cmd In Cmds If Cmd.IsTraceField Then If Cmd.GetText(TRACE_NAME, 0) = "Serial Number" Then VSERIALNUMBER = Cmd.GetText(TRACE_VALUE, 0) MsgBox VSERIALNUMBER End If End If Next Cmd End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |