From 112b85531460ea9eaa0222eb2a7bb82f2ef08bd6 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 8 Mar 2016 15:08:30 +0000 Subject: [PATCH] OmagCUT : - abilitata visualizzazione lovorazioni in simulazione anche con 1 sola fase. --- CamAuto.vb | 18 ++++++++++++++++++ SimulationPageUC.xaml.vb | 3 +++ 2 files changed, 21 insertions(+) diff --git a/CamAuto.vb b/CamAuto.vb index b3408c3..68a96fd 100644 --- a/CamAuto.vb +++ b/CamAuto.vb @@ -88,6 +88,24 @@ Public Module CamAuto Return True End Function + Friend Function ShowAllCurrPhaseMachinings() As Boolean + ' Parto dalla prima lavorazione successiva alla disposizione di fase + Dim nId As Integer = EgtGetPhaseDisposition(EgtGetCurrPhase()) + nId = EgtGetNextOperation(nId) + ' Finchè c'è una lavorazione + While nId <> GDB_ID.NULL + ' Se disposizione sono alla fase successiva + If EgtGetOperationType(nId) = MCH_OY.DISP Then Exit While + ' Se abilitata + If EgtGetOperationMode(nId) Then + EgtSetOperationStatus(nId, True) + End If + ' Passo alla successiva + nId = EgtGetNextOperation(nId) + End While + Return True + End Function + Friend Function VerifySetup(ByRef sMissingTools As String) As Boolean Dim bOk As Boolean = True sMissingTools = String.Empty diff --git a/SimulationPageUC.xaml.vb b/SimulationPageUC.xaml.vb index 00fed10..995eef5 100644 --- a/SimulationPageUC.xaml.vb +++ b/SimulationPageUC.xaml.vb @@ -73,6 +73,9 @@ Public Class SimulationPageUC m_CurrProjPage.SaveFile(sMchPath) ' Nascondo eventuali pezzi in parcheggio HideParkedParts() + ' Imposto prima fase + EgtSetCurrPhase(1) + ShowAllCurrPhaseMachinings() ' Visualizzo opportunamente la macchina m_nMachLook = MCH_LOOK.ALL EgtSetMachineLook(m_nMachLook)