diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderViewModel.vb b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderViewModel.vb index 7634a3d..e313e9d 100644 --- a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderViewModel.vb +++ b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderViewModel.vb @@ -658,8 +658,33 @@ Namespace EgtCAM5 ''' Execute the Point. This method is invoked by the PointCommand. ''' Public Sub NewPositioning(ByVal param As Object) + ' Recupero grezzi e bloccaggi dell'ultima fase + Dim nLastPhase As Integer = EgtGetPhaseCount() + EgtSetCurrPhase(nLastPhase) + Dim vRawId As New List(Of Integer) + Dim nRawId As Integer = EgtGetFirstRawPart() + While nRawId <> GDB_ID.NULL + If EgtVerifyRawPartPhase(nRawId, nLastPhase) Then + vRawId.Add(nRawId) + End If + nRawId = EgtGetNextRawPart(nRawId) + End While + Dim vFxtId As New List(Of Integer) + Dim nFxtId As Integer = EgtGetFirstFixture() + While nFxtId <> GDB_ID.NULL + vFxtId.Add(nFxtId) + nFxtId = EgtGetNextFixture(nFxtId) + End While + ' Aggiungo la nuova fase Dim nPhase As Integer = EgtAddPhase() Dim nDispId As Integer = EgtGetPhaseDisposition(nPhase) + ' Confermo grezzi e bloccaggi sopra salvati + For Each nId As Integer In vRawId + EgtKeepRawPart(nId, nLastPhase) + Next + For Each nId As Integer In vFxtId + EgtKeepFixture(nId, nLastPhase) + Next ' Ricarico la lista delle operazioni Application.Msn.NotifyColleagues(Application.LOADOPERATIONLIST, nDispId) End Sub