Your Products have been synced, click here to refresh
Sorry for the late response I was out for a few days.
This is how the code sits now:
'Set Program Variables Public Sub VarSet() Dim PCDApp, PCDPartPrograms, PCDPartProgram Dim PCDCommands, PCDCommand As Object Dim Shift As String PCDApp = CreateObject("PCDLRN.Application") PCDPartProgram = PCDApp.ActivePartProgram PCDCommands = PCDPartProgram.Commands PCDPartProgram = PCDApp.ActivePartProgram Cmds = PCDPartProgram.Commands For i = 1 To Cmds.Count Cmd = Cmds.Item(i) If Cmd.Type = "Assignment" And Cmd.GetText(DEST_EXPR, 0) = "JOBNO" Then retval = Cmd.PutText(TextBox3.Text, SRC_EXPR, 0) End If Next i endForm() End Sub
I am still getting errors on retval, DEST_EXPR, SRC_EXPR saying they are not declared.
Sorry for the late response I was out for a few days.
This is how the code sits now:
'Set Program Variables Public Sub VarSet() Dim PCDApp, PCDPartPrograms, PCDPartProgram Dim PCDCommands, PCDCommand As Object Dim Shift As String PCDApp = CreateObject("PCDLRN.Application") PCDPartProgram = PCDApp.ActivePartProgram PCDCommands = PCDPartProgram.Commands PCDPartProgram = PCDApp.ActivePartProgram Cmds = PCDPartProgram.Commands For i = 1 To Cmds.Count Cmd = Cmds.Item(i) If Cmd.Type = "Assignment" And Cmd.GetText(DEST_EXPR, 0) = "JOBNO" Then retval = Cmd.PutText(TextBox3.Text, SRC_EXPR, 0) End If Next i endForm() End Sub
I am still getting errors on retval, DEST_EXPR, SRC_EXPR saying they are not declared.
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |