Your Products have been synced, click here to refresh
Sub Main (PN As String, OP As String, SN As String, RPTTIME As String, RPTDATE As String, PRG As String, PRG_TYPE As String) Dim App As Object Dim Part As Object Dim Cmds As Object Dim Cmd As Object ' Initialize PC-DMIS Set App = CreateObject("PCDLRN.Application") If App Is Nothing Then MsgBox "PC-DMIS initialization error!",48, "Error!" Exit Sub Else Set Part = App.ActivePartProgram If Part Is Nothing Then MsgBox "Part Program not opened!", 48, "Error!" Exit Sub Else Set Cmds = Part.Commands If Cmds Is Nothing Then MsgBox "Pointer to commands not valid!", 48, "Error!" Exit Sub End If End If End If Dim CrntName As String Dim NewName As String CrntName = Part.FullName 'MsgBox(CrntName) Newname = PRG & PN & "\RESULTS\" & OP & "\" & PN & "_" & OP & "_" & PRG_TYPE & "_" & SN & "_" & RPTDATE & "_" & RPTTIME & ".PRG" 'MsgBox(Newname) Dim Retval As Boolean retval = Part.SaveAs(newname) ' Cleanup Set Cmd = Nothing Set Cmds = Nothing Set Part = Nothing Set App = Nothing End Sub
Set Part_Num = Part.GetVariableValue ("PN") PN = Part_Num.doublevalue
Sub Main (PN As String, OP As String, SN As String, RPTTIME As String, RPTDATE As String, PRG As String, PRG_TYPE As String) Dim App As Object Dim Part As Object Dim Cmds As Object Dim Cmd As Object ' Initialize PC-DMIS Set App = CreateObject("PCDLRN.Application") If App Is Nothing Then MsgBox "PC-DMIS initialization error!",48, "Error!" Exit Sub Else Set Part = App.ActivePartProgram If Part Is Nothing Then MsgBox "Part Program not opened!", 48, "Error!" Exit Sub Else Set Cmds = Part.Commands If Cmds Is Nothing Then MsgBox "Pointer to commands not valid!", 48, "Error!" Exit Sub End If End If End If Dim CrntName As String Dim NewName As String CrntName = Part.FullName 'MsgBox(CrntName) Newname = PRG & PN & "\RESULTS\" & OP & "\" & PN & "_" & OP & "_" & PRG_TYPE & "_" & SN & "_" & RPTDATE & "_" & RPTTIME & ".PRG" 'MsgBox(Newname) Dim Retval As Boolean retval = Part.SaveAs(newname) ' Cleanup Set Cmd = Nothing Set Cmds = Nothing Set Part = Nothing Set App = Nothing End Sub
Set Part_Num = Part.GetVariableValue ("PN") PN = Part_Num.doublevalue
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |