Your Products have been synced, click here to refresh
Sub Main 'Declares the File System Object And Instantiates it Dim objFSO Set objFSO = CreateObject("Scripting.FileSystemObject") Dim Count As Integer 'Declares PC-DMIS As the Active Program/Application Dim PCDApp, Part, Cmds, Cmd, TCmd As Object Set PCDApp = CreateObject("PCDLRN.Application") Set Part = PCDApp.ActivePartProgram Set Cmds = Part.Commands For Each Cmd In Cmds [COLOR=#ff0000]If Cmd.Type = 191 Then 'Think this is the tracefield type number TCmd = Cmd.gettext(TRACE_VALUE, 1)[/COLOR] Count=Count+1 End If Next Cmd
Am I on the right track with this? I keep getting a type mismatch error with the If line ("If Cmd.IsTraceFieldCommand Then")
Sub Main 'Declares the File System Object And Instantiates it Dim objFSO Set objFSO = CreateObject("Scripting.FileSystemObject") Dim Count As Integer 'Declares PC-DMIS As the Active Program/Application Dim PCDApp, Part, Cmds, Cmd, TCmd As Object Set PCDApp = CreateObject("PCDLRN.Application") Set Part = PCDApp.ActivePartProgram Set Cmds = Part.Commands For Each Cmd In Cmds [COLOR=#ff0000]If Cmd.Type = 191 Then 'Think this is the tracefield type number TCmd = Cmd.gettext(TRACE_VALUE, 1)[/COLOR] Count=Count+1 End If Next Cmd
Am I on the right track with this? I keep getting a type mismatch error with the If line ("If Cmd.IsTraceFieldCommand Then")
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |