Your Products have been synced, click here to refresh
Sub Main Return: Dim DmisApp As Object Dim DmisPart As Object Dim DmisCommands As Object Dim DmisCommand As Object Set DmisApp = CreateObject("PCDLRN.Application") Set DmisPart = DmisApp.ActivePartProgram Set DmisCommands = DmisPart.Commands CommandCount = DmisCommands.Count Set DmisCommand = DmisCommands.Item(CommandCount) Set DmisCommand = DmisCommands.CurrentCommand 'DmisCommands.InsertionPointAfter DmisCommand Begin Dialog DIALOG_1 183,33, 238, 159, "OPERATOR INPUT" GroupBox 12,8,212,124, "Work Order" CancelButton 176,140,37,12 'Text 52,113,53,12, "Last Selection: " 'TextBox 108,112,97,12, .LastSelection PushButton 24,32,85,12, "Work Order 20", .PushButton_1 PushButton 128,32,85,12, "Work Order 30 ", .PushButton_2 PushButton 24,60,85,12, "Work Order 40", .PushButton_3 PushButton 128,60,85,12, "Work Order 50", .PushButton_4 'OKButton 24,140,37,12 PushButton 92,88,53,12, "End Program", .PushButton_5 End Dialog Dim Dialog1 As DIALOG_1 '[ Dialog Input ] For Each DmisCommand In DmisCommands If DmisCommand.Type = ASSIGNMENT Then If DmisCommand.GetText(DEST_EXPR, 0) = "WORK_ORDER_V1" Then WorkOrderV1_GT= DmisCommand.GetText( SRC_EXPR, 0) If WorkOrderV1_GT= 0 Then WorkOrderV1_GT= "Work Order 20" End If If WorkOrderV1_GT= 1 Then WorkOrderV1_GT= "Work Order 30" End If If WorkOrderV1_GT= 2 Then WorkOrderV1_GT= "Work Order 40" End If If WorkOrderV1_GT= 3 Then WorkOrderV1_GT= "Work Order 50" End If If WorkOrderV1_GT= 4 Then WorkOrderV1_GT= "End Program" End If End If End If Next DmisCommand '[Default Dialog Settings] 'Dialog1.LastSelection = WorkOrderV1_GT '[Dialog returns -1 For OK, 0 For Cancel, button # For PushButtons] Button = Dialog( Dialog1 ) '[Cancel Button Settings] 'If Button = 0 Then End 'Cancel Button 'If Button = 0 Then Exit Sub 'Cancel Button 'If Button = -1 Then GoTo ExecuteWorkOrder '[Button Settings] If Button = 1 Then 'Button WorkOrderPB = 0 End If If Button = 2 Then 'Button WorkOrderPB = 1 End If If Button = 3 Then 'Button WorkOrderPB = 2 End If If Button = 4 Then 'Button WorkOrderPB = 3 End If If Button = 5 Then 'Button WorkOrderPB = 4 End If If Button = 0 Then 'Button WorkOrderPB = 4 End If ExecuteWorkOrder: For Each DmisCommand In DmisCommands If DmisCommand.Type = ASSIGNMENT Then If DmisCommand.GetText(DEST_EXPR, 0) = "WORK_ORDER_V1" Then InspectPrintSettingsPT= DmisCommand.PutText( """"+WorkOrderPB+"""",SRC_EXPR, 0) DmisCommand.ReDraw End If End If Next DmisCommand 'MsgBox "Read" 'GoTo ReadMsg ReadMsg: 'GoTo Return '[Cleanup ] Set DmisPart = Nothing Set DmisApp = Nothing Set DmisCommand = Nothing Set DmisCommands = Nothing End Sub
PART NAME : Work Order REV NUMBER : SER NUMBER : STATS COUNT : 1 STARTUP =ALIGNMENT/START,RECALL:USE_PART_SETUP,LIST=YES ALIGNMENT/END MODE/MANUAL FORMAT/TEXT,OPTIONS, ,HEADINGS,SYMBOLS, ;NOM,TOL,MEAS,DEV,OUTTOL, , LOADPROBE/3BY20_30E_TP20SF_50E TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=0 CS1 =SCRIPT/FILENAME= C:\USERS\PUBLIC\DOCUMENTS\PCDMISQUICKTOOLS\QUICKTOOLS\BASIC SCRIPT TRAINING\WORK ORDER SCRIPT1.BAS FUNCTION/Main,SHOW=YES,, STARTSCRIPT/ ENDSCRIPT/ ASSIGN/WORK_ORDER_V1=1 IF_GOTO/WORK_ORDER_V1==0,GOTO = WORK_ORDER_L20 IF_GOTO/WORK_ORDER_V1==1,GOTO = WORK_ORDER_L30 IF_GOTO/WORK_ORDER_V1==2,GOTO = WORK_ORDER_L40 IF_GOTO/WORK_ORDER_V1==3,GOTO = WORK_ORDER_L50 IF_GOTO/WORK_ORDER_V1==4,GOTO = PROGRAM_ENDING_L1 WORK_ORDER_L20=LABEL/ COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, Work Order 20 Program. GOTO/PROGRAM_ENDING_L1 WORK_ORDER_L30=LABEL/ COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, Work Order 30 Program. GOTO/PROGRAM_ENDING_L1 WORK_ORDER_L40=LABEL/ COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, Work Order 40 Program. GOTO/PROGRAM_ENDING_L1 WORK_ORDER_L50=LABEL/ COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, Work Order 50 Program. GOTO/PROGRAM_ENDING_L1 PROGRAM_ENDING_L1=LABEL/
Sub Main Return: Dim DmisApp As Object Dim DmisPart As Object Dim DmisCommands As Object Dim DmisCommand As Object Set DmisApp = CreateObject("PCDLRN.Application") Set DmisPart = DmisApp.ActivePartProgram Set DmisCommands = DmisPart.Commands CommandCount = DmisCommands.Count Set DmisCommand = DmisCommands.Item(CommandCount) Set DmisCommand = DmisCommands.CurrentCommand 'DmisCommands.InsertionPointAfter DmisCommand Begin Dialog DIALOG_1 183,33, 238, 159, "OPERATOR INPUT" GroupBox 12,8,212,124, "Work Order" CancelButton 176,140,37,12 'Text 52,113,53,12, "Last Selection: " 'TextBox 108,112,97,12, .LastSelection PushButton 24,32,85,12, "Work Order 20", .PushButton_1 PushButton 128,32,85,12, "Work Order 30 ", .PushButton_2 PushButton 24,60,85,12, "Work Order 40", .PushButton_3 PushButton 128,60,85,12, "Work Order 50", .PushButton_4 'OKButton 24,140,37,12 PushButton 92,88,53,12, "End Program", .PushButton_5 End Dialog Dim Dialog1 As DIALOG_1 '[ Dialog Input ] For Each DmisCommand In DmisCommands If DmisCommand.Type = ASSIGNMENT Then If DmisCommand.GetText(DEST_EXPR, 0) = "WORK_ORDER_V1" Then WorkOrderV1_GT= DmisCommand.GetText( SRC_EXPR, 0) If WorkOrderV1_GT= 0 Then WorkOrderV1_GT= "Work Order 20" End If If WorkOrderV1_GT= 1 Then WorkOrderV1_GT= "Work Order 30" End If If WorkOrderV1_GT= 2 Then WorkOrderV1_GT= "Work Order 40" End If If WorkOrderV1_GT= 3 Then WorkOrderV1_GT= "Work Order 50" End If If WorkOrderV1_GT= 4 Then WorkOrderV1_GT= "End Program" End If End If End If Next DmisCommand '[Default Dialog Settings] 'Dialog1.LastSelection = WorkOrderV1_GT '[Dialog returns -1 For OK, 0 For Cancel, button # For PushButtons] Button = Dialog( Dialog1 ) '[Cancel Button Settings] 'If Button = 0 Then End 'Cancel Button 'If Button = 0 Then Exit Sub 'Cancel Button 'If Button = -1 Then GoTo ExecuteWorkOrder '[Button Settings] If Button = 1 Then 'Button WorkOrderPB = 0 End If If Button = 2 Then 'Button WorkOrderPB = 1 End If If Button = 3 Then 'Button WorkOrderPB = 2 End If If Button = 4 Then 'Button WorkOrderPB = 3 End If If Button = 5 Then 'Button WorkOrderPB = 4 End If If Button = 0 Then 'Button WorkOrderPB = 4 End If ExecuteWorkOrder: For Each DmisCommand In DmisCommands If DmisCommand.Type = ASSIGNMENT Then If DmisCommand.GetText(DEST_EXPR, 0) = "WORK_ORDER_V1" Then InspectPrintSettingsPT= DmisCommand.PutText( """"+WorkOrderPB+"""",SRC_EXPR, 0) DmisCommand.ReDraw End If End If Next DmisCommand 'MsgBox "Read" 'GoTo ReadMsg ReadMsg: 'GoTo Return '[Cleanup ] Set DmisPart = Nothing Set DmisApp = Nothing Set DmisCommand = Nothing Set DmisCommands = Nothing End Sub
PART NAME : Work Order REV NUMBER : SER NUMBER : STATS COUNT : 1 STARTUP =ALIGNMENT/START,RECALL:USE_PART_SETUP,LIST=YES ALIGNMENT/END MODE/MANUAL FORMAT/TEXT,OPTIONS, ,HEADINGS,SYMBOLS, ;NOM,TOL,MEAS,DEV,OUTTOL, , LOADPROBE/3BY20_30E_TP20SF_50E TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=0 CS1 =SCRIPT/FILENAME= C:\USERS\PUBLIC\DOCUMENTS\PCDMISQUICKTOOLS\QUICKTOOLS\BASIC SCRIPT TRAINING\WORK ORDER SCRIPT1.BAS FUNCTION/Main,SHOW=YES,, STARTSCRIPT/ ENDSCRIPT/ ASSIGN/WORK_ORDER_V1=1 IF_GOTO/WORK_ORDER_V1==0,GOTO = WORK_ORDER_L20 IF_GOTO/WORK_ORDER_V1==1,GOTO = WORK_ORDER_L30 IF_GOTO/WORK_ORDER_V1==2,GOTO = WORK_ORDER_L40 IF_GOTO/WORK_ORDER_V1==3,GOTO = WORK_ORDER_L50 IF_GOTO/WORK_ORDER_V1==4,GOTO = PROGRAM_ENDING_L1 WORK_ORDER_L20=LABEL/ COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, Work Order 20 Program. GOTO/PROGRAM_ENDING_L1 WORK_ORDER_L30=LABEL/ COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, Work Order 30 Program. GOTO/PROGRAM_ENDING_L1 WORK_ORDER_L40=LABEL/ COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, Work Order 40 Program. GOTO/PROGRAM_ENDING_L1 WORK_ORDER_L50=LABEL/ COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, Work Order 50 Program. GOTO/PROGRAM_ENDING_L1 PROGRAM_ENDING_L1=LABEL/
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |