Your Products have been synced, click here to refresh
Ok so I normally use a comment to display information about a program that I keep hardcoded in the program. Print Information, What operation the program is for. Just normal stuff for the operators. I'm trying to condense it all down to a neat window that has their inputs and will display the information as well. I can't seem to figure out how to display the contents of a PC Dmis variable in a text object in a Basic Script Dialogue display.
Set Partnam = Part.GetVariableValue("PARTNAM")
Text 160,40,80,12, .Text2
Dialg.Text2= Printnam.StringValue
I can't use the last line prior to the dialogue. If I use it after it still shows up blank. Any positive/constructive ideas? I'm sure i'm just missing a simple step.
ASSIGN/CMMPROGRAM="867575" ASSIGN/PRINTREV1="534543"+" , Rev."+"A" ASSIGN/PARTNAM="54w643653" ASSIGN/PARTNUM="4356363ty3y" CS3 =SCRIPT/FILENAME= C:\PC-DMIS\4_3\BASIC SCRIPTS\FORM EXAMPLE.BAS FUNCTION/Main,SHOW=YES,, STARTSCRIPT/ ENDSCRIPT/ ASSIGN/OPERATOR="" ASSIGN/JOB="" ASSIGN/SAMP=""
Sub[SIZE=2][COLOR=#000000] Main[/COLOR] [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'PCDMIS COMMANDS assignment [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] App, Part, Cmds, Cmd [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Object Set[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] App = CreateObject("PCDLRN.Application")[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] Set[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Part = App.ActivePartProgram[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] Set[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmds = Part.Commands[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Samp [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]String Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Shift [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]String Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Prognam, Printnam, Partnam, Partnum, Opera, Jo, Sam [/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] Set[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Prognam= Part.GetVariableValue("CMMPROGRAM")[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Set[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Printnam= Part.GetVariableValue("PRINTREV1")[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Set[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Partnam= Part.GetVariableValue("PARTNAM")[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Set[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Partnum= Part.GetVariableValue("PARTNUM")[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Set[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Opera= Part.GetVariableValue("OPERATOR")[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Set[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Jo= Part.GetVariableValue("JOB")[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Set[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Sam= Part.GetVariableValue("SAMP")[/COLOR] [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Opens Dialog For Input [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] Begin[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Dialog[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] DIALOG_1 50,10, 300, 125, oOPERATORINPUT[/COLOR] [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Display text For Program Information [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Text 160,10,80,12, "Program Name :" Text 160,20,80,12, .Text1 Text 160,30,80,12, "Print Information :" Text 160,40,80,12, .Text2 Text 160,50,80,12, "Part Name :" Text 160,60,80,12, .Text3 Text 160,70,80,12, "Part Number :" Text 160,80,80,12, .Text4 [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Box & Text For Operator Input [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] GroupBox 5,5,150,25 Text 10,15,85,12, "Enter Operator :" TextBox 65,13,50,12, .EditBox_1 [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Box & Text For Job # Input [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] GroupBox 5,25,150,25 Text 10,35,85,12, "Enter Job # :" TextBox 65,33,50,12, .EditBox_2 [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Box & Text For Sample # Input [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] GroupBox 5,45,150,25 Text 10,55,85,12, "Enter Sample # :" TextBox 65,53,20,12, .EditBox_3 [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Box & Buttons & Text For Shift Selection [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] GroupBox 5,65,150,25 Text 10,75,25,12, "Shift # :" OptionGroup .grp1 OptionButton 50,74,22,12, "1st", .option1 OptionButton 75,74,22,12, "2nd", .option2 OptionButton 100,74,22,12, "3rd", .option3 [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Box & Text & Buttons For Help Request [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] GroupBox 5,85,150,35 Text 10,95,50,24, "Notes :" Text 35,95,85,12, "(Check what you need)" Text 10,105,35,12, "Fixturing?" CheckBox 45,104,20,12, .CheckBox_4 Text 70,105,25,12,"Probe?" CheckBox 95,104,20,12, .CheckBox_5 [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Ok And Cancel Buttons [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] OKButton 160,100,57,15 CancelButton 225,100,57,15 [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Dialog [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Code Begins [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Dialg [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] DIALOG_1[/COLOR] [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Dimension Text Boxes To show Variables [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Dialg.Text1=Prognam.StringValue < ------ I'm trying to figure out how to get these to show Dialg.Text2=Printnam.StringValue [SIZE=2]< ------ [/SIZE] Dialg.Text3=Partnam.StringValue [SIZE=2]< ------[/SIZE] Dialg.Text4=Partnum.StringValue [SIZE=2]< ------[/SIZE] Dialg.EditBox_1=Opera.StringValue [SIZE=2]< ------ These would be used to show the last inputed[/SIZE] Dialg.EditBox_2=Jo.StringValue [SIZE=2]< ------ Value[/SIZE] Dialg.EditBox_3=Sam.StringValue [SIZE=2]< ------[/SIZE] button1 = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Dialog[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](Dialg) [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Progtype [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]String If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] button1 = 0 [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Progtype= "END" [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] Else [/COLOR][/SIZE][/COLOR][/SIZE]
ASSIGN/CMMPROGRAM="867575" ASSIGN/PRINTNUM="534543" ASSIGN/PRINTREV="A" ASSIGN/PARTNAM="54w643653" ASSIGN/PARTNUM="4356363ty3y" CS3 =SCRIPT/FILENAME= C:\PC-DMIS\4_3\BASIC SCRIPTS\FORM EXAMPLE.BAS FUNCTION/Main,SHOW=YES,, STARTSCRIPT/ ASSIGN/OPERATOR="Ryan" ASSIGN/JOB="99999" ASSIGN/SAMP="23" ASSIGN/SHIFT="1st" ASSIGN/FIXTURE="NO" ASSIGN/PROBE="NO"
Sub[SIZE=2][COLOR=#000000] Main [/COLOR] [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00]'PCDMIS COMMANDS assignment [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] App, Part, Cmds, Cmd [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Object Set[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] App = CreateObject("PCDLRN.Application")[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Set[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Part = App.ActivePartProgram[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Set[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmds = Part.Commands [/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Dim[SIZE=2][COLOR=#000000] Oper [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]String Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Job [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]String Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Samp [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]String Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Shift [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]String Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Fixture [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]String Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Probe [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]String [/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]For[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Each[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmd [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]In[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmds[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Cmd.[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Type[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = ASSIGNMENT Then [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmd.GetText(DEST_EXPR, 0) = "CMMPROGRAM" Then[/COLOR] blr= Cmd.GetText( SRC_EXPR, 0) bll= Len(blr) Prognam=Mid(blr,2,bll-2) Cmd.ReDraw [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmd.GetText(DEST_EXPR, 0) = "PRINTNUM" Then[/COLOR] blr= Cmd.GetText( SRC_EXPR, 0) bll= Len(blr) Printnum=Mid(blr,2,bll-2) Cmd.ReDraw [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmd.GetText(DEST_EXPR, 0) = "PRINTREV" Then[/COLOR] blr= Cmd.GetText( SRC_EXPR, 0) bll= Len(blr) Printrev=Mid(blr,2,bll-2) Cmd.ReDraw [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmd.GetText(DEST_EXPR, 0) = "PARTNAM" Then[/COLOR] blr= Cmd.GetText( SRC_EXPR, 0) bll= Len(blr) Partnam=Mid(blr,2,bll-2) Cmd.ReDraw [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmd.GetText(DEST_EXPR, 0) = "PARTNUM" Then[/COLOR] blr= Cmd.GetText( SRC_EXPR, 0) bll= Len(blr) Partnum=Mid(blr,2,bll-2) Cmd.ReDraw [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Cmd.GetText(DEST_EXPR, 0) = "OPERATOR" [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]blr= Cmd.GetText( SRC_EXPR, 0) bll= Len(blr) Opera=Mid(blr,2,bll-2) Cmd.ReDraw [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmd.GetText(DEST_EXPR, 0) = "JOB" [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]blr= Cmd.GetText( SRC_EXPR, 0) bll= Len(blr) Jo=Mid(blr,2,bll-2) Cmd.ReDraw [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmd.GetText(DEST_EXPR,0) = "SAMP" [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]blr= Cmd.GetText( SRC_EXPR, 0) bll= Len(blr) Sam=Mid(blr,2,bll-2) Cmd.ReDraw [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If Next[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmd [/COLOR] Printnam = Printnum & " , Rev : " & Printrev [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00]'Opens Dialog For Input [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Begin[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Dialog[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] DIALOG_1 50,10, 300, 125, oOPERATORINPUT [/COLOR] [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00]'Display text For Program Information [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Text 160,10,80,12, "Program Name :" Textbox 160,20,120,12, .Text1, &h0800& ' Readonly Text 160,32,80,12, "Print Information :" Textbox 160,42,120,12, .Text2[SIZE=2], &h0800& ' Readonly[/SIZE] Text 160,54,80,12, "Part Name :" Textbox 160,64,120,12, .Text3[SIZE=2], &h0800& ' Readonly[/SIZE] Text 160,76,80,12, "Part Number :" Textbox 160,86,120,12, .Text4[SIZE=2], &h0800& ' Readonly[/SIZE] [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Box & Text For Operator Input [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Text 10,15,85,12, "Enter Operator :" TextBox 65,13,50,12, .Text5 [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Box & Text For Job # Input [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Text 10,35,85,12, "Enter Job # :" TextBox 65,33,50,12, .Text6 [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Box & Text For Sample # Input [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Text 10,55,85,12, "Enter Sample # :" TextBox 65,53,20,12, .Text7 [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Box & Buttons & Text For Shift Selection [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]GroupBox 5,65,150,25 Text 10,75,25,12, "Shift # :" OptionGroup .grp1 OptionButton 50,74,22,12, "1st", .option1 OptionButton 75,74,22,12, "2nd", .option2 OptionButton 100,74,22,12, "3rd", .option3 [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Box & Text & Buttons For Help Request [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Text 10,95,50,24, "Notes :" Text 35,95,85,12, "(Check what you need)" Text 10,105,35,12, "Fixturing?" CheckBox 45,104,20,12, .CheckBox_4 Text 70,105,25,12,"Probe?" CheckBox 95,104,20,12, .CheckBox_5 [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Ok And Cancel Buttons [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]OKButton 160,100,57,15 CancelButton 225,100,57,15 [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Dialog [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Code Begins [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Dialg [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] DIALOG_1[/COLOR] [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00] 'Dimension Text Boxes To show Variables [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Dialg.Text1=Prognam Dialg.Text2=Printnam Dialg.Text3=Partnam Dialg.Text4=Partnum Dialg.Text5=Opera Dialg.Text6=Jo Dialg.Text7=Sam [/SIZE]
button1 = [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Dialog[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](Dialg) [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Progtype [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]String If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] button1 = 0 [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Progtype= "END" [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Else [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00]'Dimensions Each box Input To an assignment [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Oper = Dialg.Text5 Job = Dialg.Text6 Samp = Dialg.Text7 fixt = Dialg.Checkbox_4 prob = Dialg.Checkbox_5 [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00]'Controls shift Selection [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Select[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Case[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Dialg.grp1[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Case[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] 0 Shift = ("1st") [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Case[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] 1 Shift = ("2nd") [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Case[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] 2 Shift = ("3rd") [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Select [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00]'Controls Help Selection [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] fixt = 1 [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Fixture =("YES") [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Else [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Fixture =("NO") [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] prob = 1 [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Probe =("YES") [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Else [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Probe =("NO") [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00]'Begins the Variable assignment To PCDMIS For Each COMMAND [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]For[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Each[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmd [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]In[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmds[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Cmd.[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Type[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = ASSIGNMENT [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Cmd.GetText(DEST_EXPR, 0) = "OPERATOR" [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]bln = Cmd.PutText("""" + Oper + """", SRC_EXPR, 0) Cmd.ReDraw [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Cmd.GetText(DEST_EXPR, 0) = "JOB" [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]bln = Cmd.PutText("""" + Job + """", SRC_EXPR, 0) Cmd.ReDraw [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Cmd.GetText(DEST_EXPR,0) = "SAMP" [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]bln = Cmd.PutText("""" + Samp + """", SRC_EXPR, 0) Cmd.ReDraw [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Cmd.GetText(DEST_EXPR,0) = "SHIFT" [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]bln = Cmd.PutText("""" + Shift + """", SRC_EXPR, 0) Cmd.ReDraw [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Cmd.GetText(DEST_EXPR,0) = "FIXTURE" [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]bln = Cmd.PutText("""" + Fixture + """", SRC_EXPR, 0) Cmd.ReDraw [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Cmd.GetText(DEST_EXPR,0) = "PROBE" [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]bln = Cmd.PutText("""" + Probe + """", SRC_EXPR, 0) Cmd.ReDraw [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If Next[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Cmd[/COLOR] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Sub [/COLOR][/SIZE][/COLOR][/SIZE]
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |