diff --git a/SetUpWindow/SetUpViewModel.vb b/SetUpWindow/SetUpViewModel.vb index 84f4017..1525b63 100644 --- a/SetUpWindow/SetUpViewModel.vb +++ b/SetUpWindow/SetUpViewModel.vb @@ -249,6 +249,20 @@ Namespace EgtCAM5 Return (nErr = 0) End Function + ' funzione che mantiene le posizioni ma elimina tutti gli utensili attrezzati + Private Sub ClearAllPos() + For GroupIndex = 0 To m_PositionGroupList.Count - 1 + For PositionIndex = 0 To m_PositionGroupList(GroupIndex).PositionList.Count - 1 + For ExitIndex = 0 To m_PositionGroupList(GroupIndex).PositionList(PositionIndex).ExitToolAssociationList.Count - 1 + Dim TempExit As ExitToolAssociation = m_PositionGroupList(GroupIndex).PositionList(PositionIndex).ExitToolAssociationList(ExitIndex) + ' e lo tolgo dalla posizione di attrezzaggio + TempExit.Tool = Nothing + TempExit.IsOccupied = False + Next + Next + Next + End Sub + ' Funzione che verifica che l'indice del gruppo sia valido, esista, e nel caso non esistesse aggiunge i gruppi necessari Private Function VerifyIndexValidity(nGroupIndex As Integer) As Boolean ' verifico che l'indice del gruppo sia valido @@ -655,14 +669,9 @@ Namespace EgtCAM5 ' resetto lista utensili e posizioni m_ToolsList.Clear() - m_PositionGroupList.Clear() + ClearAllPos() 'ricarico lista utensili LoadMachineTools() - ' genero una nuova lista delle posizioni dalla configurazione nel file ini della macchina - Dim Index As Integer = 1 - While CreateStdPosFromPosIndex(Index) - Index += 1 - End While ' leggo l'attrezzaggio dal file scelto Dim sPosition As String = String.Empty Dim IniIndex As Integer = 1 diff --git a/ToolsDbWindow/ToolsDbViewModel.vb b/ToolsDbWindow/ToolsDbViewModel.vb index 38bf490..767d8ca 100644 --- a/ToolsDbWindow/ToolsDbViewModel.vb +++ b/ToolsDbWindow/ToolsDbViewModel.vb @@ -284,7 +284,7 @@ Namespace EgtCAM5 EgtLuaResetGlobVar("STU") ' altrimenti Else - MessageBox.Show("SetUp configuration file not found!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) + MessageBox.Show(EgtMsg(MSG_TOOLSERRORS + 25), EgtMsg(MSG_TOOLSERRORS + 26), MessageBoxButton.OK, MessageBoxImage.Error) EgtOutLog("Error: SetUp configuration file not found!") End If