Your Products have been synced, click here to refresh
Dim PCDApp As PCDLRN.Application Dim WithEvents AppEvents As PCDLRN.ApplicationObjectEvents Sub Start() HideExcel End Sub Private Sub HideExcel() Dim intAnswer As Integer intAnswer = MsgBox("Do you want to make Excel invisible? For this test, you should click Yes. It will become visible when you open a part program.", vbYesNo, "Hide Excel?") If intAnswer = vbYes Then Application.Visible = False Else Application.Visible = True End If LaunchPCDMIS End Sub Sub LaunchPCDMIS() Set PCDApp = CreateObject("PCDLRN.Application") Set AppEvents = PCDApp.ApplicationEvents PCDApp.Visible = True End Sub Private Sub AppEvents_OnOpenPartProgram(ByVal PartProg As PCDLRN.IPartProgram) ' Event subroutine. This activates when you OPEN a part program. Set PartProg = PCDApp.ActivePartProgram Application.Visible = True MsgBox "Part Program " & PartProg.Name & " opened. Excel should also be visible." End Sub Private Sub AppEvents_OnStartExecution(ByVal PartProg As PCDLRN.IPartProgram) ' Event subroutine. This activates when you START EXECUTION of the part program. MsgBox "STARTING EXECUTION OF " & PartProg.Name & ". Click OK to continue." End Sub Private Sub AppEvents_OnEndExecution(ByVal PartProg As PCDLRN.IPartProgram, ByVal TerminationType As Long) ' Event subroutine. This activates when you END EXECUTION of the part program. MsgBox "ENDING EXECUTION OF " & PartProg.Name & ". Click OK to continue." End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |