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)