Your Products have been synced, click here to refresh
Dim DmisApp As Object Dim DmisPart As Object Dim DmisCommands As Object Dim DmisCommand As Object Dim PrbName, TipID, ProgName As String Sub Main Set DmisApp = CreateObject("PCDLRN.Application") Set DmisPart = DmisApp.ActivePartProgram Set DmisCommands = DmisPart.Commands CommandCount = DmisCommands.Count Set DmisCommand = DmisCommands.Item(CommandCount) DmisCommands.InsertionPointAfter DmisCommand Open "C:\Users\Public\Documents\Probe_And_TIps_List.csv" For Output As #1 PrbName = "" TipID = "" ProgName = DmisPart.FullName For Each DmisCommand In DmisCommands If DmisCommand.Type = 61 Then ' 61 = LoadProbe command PrbName = DmisCommand.GetText(152,0) ' Data Type 152 = probefile Name End If If DmisCommand.Type = 60 Then ' 60 = Set Active Tip Command TipID = DmisCommand.gettext(3,0) ' Data Type 3 = ID End If If PrbName <> "" Then If TipID <> "" Then Print #1, ProgName & Chr(44) & PrbName & Chr(44) & TipID ' CHR(44) is the ASCII code For a comma End If End If Next Close #1 End Sub
The Pc-DMIS object library is so vast, I don't quite know where to begin.
What I want to do is open a file in vba, (this part I know how to do), and write out a list of which probes and tip angles are being used in the program. Not which ones are available, but which are being used.
Help??
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |