EgtCAM5 :

- aggiunte per gestione DB utensili da file tol su linea di comando.
This commit is contained in:
Dario Sassi
2017-12-02 18:42:07 +00:00
parent c0a15eff17
commit ecb9d7caf6
5 changed files with 294 additions and 48 deletions
@@ -417,6 +417,11 @@ Namespace EgtCAM5
Public Sub Generate(ByVal param As Object)
' Recupero la fase corrente
Dim nPhase As Integer = EgtGetCurrPhase()
' Aggiorno le lavorazioni
If Not UpdateAllMachinings() Then
EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True)
Return
End If
' Eseguo
Dim sCurrFilePath As String = String.Empty
EgtGetCurrFilePath(sCurrFilePath)
@@ -446,11 +451,7 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, EgtMsg(MSG_SIMULATION + 32))
End If
' Torno alla fase originale (o alla prima se non definita)
If nPhase = 0 Then
EgtSetCurrPhase(1, True)
Else
EgtSetCurrPhase(nPhase, True)
End If
EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True)
End Sub
#End Region ' GenerateCommand
@@ -459,7 +460,31 @@ Namespace EgtCAM5
#Region "METHODS"
Private Function UpdateAllMachinings() As Boolean
' Eseguo ricalcolo
Dim bModified As Boolean = EgtGetModified()
Dim sErr As String = String.Empty
Dim bOk As Boolean = EgtApplyAllMachinings(False, False, sErr)
' In caso di errori, li segnalo
If Not bOk Then
If Not String.IsNullOrEmpty(sErr) Then
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
End If
End If
If Not bModified Then EgtResetModified()
Return bOk
End Function
Private Sub InitializeSimulation()
' Recupero la fase corrente
Dim nPhase As Integer = EgtGetCurrPhase()
' Aggiorno le lavorazioni
If Not UpdateAllMachinings() Then
EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True)
Return
End If
' Costringo ad aggiornare UI
UpdateUI()
' Imposto stato corrente