Your Products have been synced, click here to refresh
CS1 =SCRIPT/FILENAME= C:\YOUR_FOLDER_HERE\OPERATOR_INPUTS.BAS FUNCTION/Main,SHOW=YES,, STARTSCRIPT/ ENDSCRIPT/
Sub Main Begin Dialog DIALOG_1 50,10, 275, 300, oOPERATORINPUT GroupBox 5,5,260,25 Text 20,15,85,12, "Enter Operator:" TextBox 85,13,135,12, .EditBox_1 GroupBox 5,35,260,25 Text 25,45,85,12, "Enter Job Number:" TextBox 95,43,135,12, .EditBox_2 GroupBox 5,65,260,25 Text 32,75,85,12, "Enter Serial Number:" TextBox 105,73,135,12, .EditBox_3 GroupBox 5,210,172,25 Text 10,220,85,12, "Need Manual Alignment?" OptionGroup .GROUP_2 OptionButton 105,220,25,12, "YES" OptionButton 145,220,25,12, "NO" OKButton 195,210,65,45 CancelButton 120,275,48,16 End Dialog Dim Dialg As DIALOG_1 button1 = Dialog(Dialg) Dim Progtype As String Dim MANUALQ As String MANUALQ= "YES" If button1 = 0 Then Progtype= "END" Else Select Case Dialg.GROUP_2 Case 0 MANUALQ= "YES" Case 1 MANUALQ= "NO" End Select Dim SerNum As String Oper = Dialg.EditBox_1 Job = Dialg.EditBox_2 SerNum = Dialg.EditBox_3 End If Dim App As Object Set App = CreateObject("PCDLRN.Application") Dim Part As Object Set Part = App.ActivePartProgram Dim Cmds As Object Dim Cmd As Object Set Cmds = Part.Commands For Each Cmd In Cmds If Cmd.Type = ASSIGNMENT Then If Cmd.GetText(DEST_EXPR, 0) = "OPERATOR" Then bln = Cmd.PutText("""" + Oper + """", SRC_EXPR, 0) Cmd.ReDraw End If If Cmd.GetText(DEST_EXPR, 0) = "JOB" Then bln = Cmd.PutText("""" + Job + """", SRC_EXPR, 0) Cmd.ReDraw End If If Cmd.GetText(DEST_EXPR,0) = "SERNO" Then bln = Cmd.PutText("""" + SerNum + """", SRC_EXPR, 0) Cmd.ReDraw End If If Cmd.GetText(DEST_EXPR,0) = "MANUAL" Then bln = Cmd.PutText("""" + MANUALQ + """", SRC_EXPR, 0) Cmd.ReDraw End If End If Next Cmd End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |