Your Products have been synced, click here to refresh
Sub Main CHECKBUSH End Sub Sub CHECKBUSH 'Declare local variables Dim DmisApp As Object Dim DmisPart As Object Dim Probe As Object Dim tempstr as String Dim Var as Object 'Set application objects Set DmisApp = CreateObject ("PCDLRN.Application") Set DmisPart = DmisApp.ActivePartProgram Set Probe = DmisPart.Probes(DmisPart.CurrentProbeName) Set Var = DmisPart.GetVariableValue ("V1") Var.LongValue = 0 'Iterate through probe components looking for probehead For i = 0 to Probe.ConnectionCount() - 1 tempstr = Ucase(Probe.ConnectionDescription(i)) If InStr(1, tempstr, "TESASTAR_M") Then Var.LongValue = 1 Exit For ElseIf InStr(1, tempstr, "TESASTAR_SM") Then Var.LongValue = 1 Exit For ElseIf InStr(1, tempstr, "PH8") Then Var.LongValue = 1 Exit For ElseIf InStr(1, tempstr, "PH9") Then Var.LongValue = 1 Exit For ElseIf InStr(1, tempstr, "PH10") Then Var.LongValue = 1 Exit For End If Next DmisPart.SetVariableValue "V1", Var DmisPart.RefreshPart 'Clear objects Set Var = Nothing Set Probe = Nothing Set DmisPart = Nothing Set DmisApp = Nothing End Sub
Sub Main CHECKBUSH End Sub Sub CHECKBUSH 'Declare local variables Dim DmisApp As Object Dim DmisPart As Object Dim Probe As Object Dim tempstr as String Dim Var as Object 'Set application objects Set DmisApp = CreateObject ("PCDLRN.Application") Set DmisPart = DmisApp.ActivePartProgram Set Probe = DmisPart.Probes(DmisPart.CurrentProbeName) Set Var = DmisPart.GetVariableValue ("V1") Var.LongValue = 0 'Iterate through probe components looking for probehead For i = 0 to Probe.ConnectionCount() - 1 tempstr = Ucase(Probe.ConnectionDescription(i)) If InStr(1, tempstr, "TESASTAR_M") Then Var.LongValue = 1 Exit For ElseIf InStr(1, tempstr, "TESASTAR_SM") Then Var.LongValue = 1 Exit For ElseIf InStr(1, tempstr, "PH8") Then Var.LongValue = 1 Exit For ElseIf InStr(1, tempstr, "PH9") Then Var.LongValue = 1 Exit For ElseIf InStr(1, tempstr, "PH10") Then Var.LongValue = 1 Exit For End If Next DmisPart.SetVariableValue "V1", Var DmisPart.RefreshPart 'Clear objects Set Var = Nothing Set Probe = Nothing Set DmisPart = Nothing Set DmisApp = Nothing End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |