From 02af01052b9cf68fee9022e6ecaef020a75b7d97 Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Wed, 31 Jul 2024 18:31:32 +0200 Subject: [PATCH 01/12] Gestione invio programmi doppia tavola --- NcComm/CNCommunication.vb | 5 +++++ Project/ProjectMgrUC.xaml.vb | 24 ++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/NcComm/CNCommunication.vb b/NcComm/CNCommunication.vb index c102f6a..a7d5f0d 100644 --- a/NcComm/CNCommunication.vb +++ b/NcComm/CNCommunication.vb @@ -1455,6 +1455,11 @@ Public Class CNCommunication Friend Function SendProgram(ByVal sCncPath As String, ByVal nNumProg As Integer, Optional bActivate As Boolean = True) As Boolean Dim bOk As Boolean = True + + ' !!!!!!!!!!!!!!!!!! FORZO IL PROGRAMMA !!!!!!!!!!!!!!!!!! + ' m_nNCType = 2 + ' !!!!!!!!!!!!!!!!!! FORZO IL PROGRAMMA !!!!!!!!!!!!!!!!!! + ' Download programma If m_MainWindow.m_bNCLink Then bOk = (m_nNCType > 0) diff --git a/Project/ProjectMgrUC.xaml.vb b/Project/ProjectMgrUC.xaml.vb index 2643764..aec6d1b 100644 --- a/Project/ProjectMgrUC.xaml.vb +++ b/Project/ProjectMgrUC.xaml.vb @@ -744,6 +744,12 @@ Public Class ProjectMgrUC Exit For End If Next + + ' leggo il nome della tavola da cui sto lanciando il progetto + Dim sTabeName As String = String.Empty + EgtGetTableName(sTabeName) + Dim bDoubleProg As Boolean = (GetPrivateProfileInt(S_PRODUCTIONLINE, "DoubleProg", 0, m_MainWindow.GetMachIniFile()) <> 0) + ' Leggo eventuale variabile per lavorazione con 2 tavole in parallelo (standard E80027) Dim nVarProgTwins As Integer = 1 If Not String.IsNullOrWhiteSpace(m_CurrMachine.sVarProgTwins) Then @@ -757,8 +763,22 @@ Public Class ProjectMgrUC End If Next End If + ' Verifico se posso scrivere nell'area 1 - If nVarProg1 = 0 And (nVarProg2 <> 1 Or nVarProgTwins = 2) Then + Dim bSendToAre1 As Boolean = (nVarProg1 = 0 And (nVarProg2 <> 1 Or nVarProgTwins = 2)) + Dim bSendToAre2 As Boolean = (nVarProg2 = 0 And (nVarProg1 <> 1 Or nVarProgTwins = 2)) + + If bDoubleProg Then + If sTabeName = MAIN_TAB Then + bSendToAre1 = True + bSendToAre2 = False + Else + bSendToAre1 = False + bSendToAre2 = True + End If + End If + + If bSendToAre1 Then m_CurrNcComm.SetProgramMainOrSub(False) If m_CurrNcComm.SendProgram(sCncPath, m_CurrMachine.nProg1, False) Then ' Dichiaro part program inviato @@ -775,7 +795,7 @@ Public Class ProjectMgrUC End If m_CurrNcComm.SetProgramMainOrSub(True) ' Altrimenti verifico se posso scrivere nell'area 2 - ElseIf nVarProg2 = 0 And (nVarProg1 <> 1 Or nVarProgTwins = 2) Then + ElseIf bSendToAre2 Then m_CurrNcComm.SetProgramMainOrSub(False) If m_CurrNcComm.SendProgram(sCncPath, m_CurrMachine.nProg2, False) Then ' Dichiaro part program inviato From 004591896c9b553a5b788c20b8df286afe91f86b Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Thu, 1 Aug 2024 10:57:59 +0200 Subject: [PATCH 02/12] Messaggio di Kill Process per SiemensComm --- NcComm/CNCommunication.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/NcComm/CNCommunication.vb b/NcComm/CNCommunication.vb index a7d5f0d..8ff047b 100644 --- a/NcComm/CNCommunication.vb +++ b/NcComm/CNCommunication.vb @@ -247,6 +247,7 @@ Public Class CNCommunication For Each proc As System.Diagnostics.Process In pList If proc.ProcessName.ToString = sAppName Then proc.Kill() + EgtOutLog("ProcessKill : " & """" & sProcessName & """") End If Next End Sub From 65b9bfdcdba80a5f00fe782fee41744e59e9eaf4 Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Tue, 6 Aug 2024 15:48:49 +0200 Subject: [PATCH 03/12] Migliorati messaggi comunicazione CN --- MainWindow.xaml.vb | 1 + NcComm/CNCommunication.vb | 2 +- Project/ProjectMgrUC.xaml.vb | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/MainWindow.xaml.vb b/MainWindow.xaml.vb index 2071b07..2d7c3d7 100644 --- a/MainWindow.xaml.vb +++ b/MainWindow.xaml.vb @@ -461,6 +461,7 @@ Class MainWindow If GetPrivateProfileInt(S_GENERAL, "Test", "0", m_sIniFile) = 0 OrElse Not File.Exists(m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Collapsed + EgtOutLog("Warning: Missing file 'TestWork.lua' in folder 'DirectCmd', buttun 'TEST' collapsed!") Else m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Visible End If diff --git a/NcComm/CNCommunication.vb b/NcComm/CNCommunication.vb index 8ff047b..0fbaa32 100644 --- a/NcComm/CNCommunication.vb +++ b/NcComm/CNCommunication.vb @@ -1494,7 +1494,7 @@ Public Class CNCommunication ' Attesa opportuna System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep) End If - EgtOutLog("Download_NC_prog(sCncPath, sNumProg)") + EgtOutLog("Download_NC_prog(" & sCncPath & ", " & sNumProg.ToString & ")") ' -------------- START DOWNLOAD -------------- TimeSpanInit() bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0) diff --git a/Project/ProjectMgrUC.xaml.vb b/Project/ProjectMgrUC.xaml.vb index aec6d1b..2d794a1 100644 --- a/Project/ProjectMgrUC.xaml.vb +++ b/Project/ProjectMgrUC.xaml.vb @@ -770,11 +770,15 @@ Public Class ProjectMgrUC If bDoubleProg Then If sTabeName = MAIN_TAB Then - bSendToAre1 = True + ' spedisco il programma da tavola 1 solo se CN ha terminato programma 901 + bSendToAre1 = (nVarProg1 = 0) bSendToAre2 = False + EgtOutLog(" Invio programma da tavola 1") Else + ' spedisco il programma da tavola 2 solo se CN ha terminato programma 902 bSendToAre1 = False - bSendToAre2 = True + bSendToAre2 = (nVarProg2 = 0) + EgtOutLog(" Invio programma da tavola 2") End If End If @@ -815,6 +819,12 @@ Public Class ProjectMgrUC Else m_CurrProjPage.SetErrorMessage(EgtMsg(90318)) 'La macchina non accetta il programma CN End If + ' avvio programma solo se DoubleProg + If (GetPrivateProfileInt(S_GENERAL, K_STARTPROGRAM, 0, m_MainWindow.GetIniFile()) <> 0 And bDoubleProg) And + (bSendToAre1 Or bSendToAre2) Then + Dim MyCicloStartWD As New CicloStartWD(m_MainWindow) + MyCicloStartWD.ShowDialog() + End If End If #End If From a2104eaa0389729d9b87ffb08a48d8388f3026a2 Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Mon, 19 Aug 2024 10:21:01 +0200 Subject: [PATCH 04/12] Nuovi messaggi e CMD.TABLE in lua script --- DirectCuts/ControlsMachineButtonUC.xaml.vb | 11 ++++++++++- DirectCuts/SawTestUC.xaml.vb | 4 ++++ Machine/AlarmsPageUC.xaml.vb | 8 ++++---- Machine/CurrentMachine.vb | 4 +++- Project/ProjectMgrUC.xaml.vb | 2 +- 5 files changed, 22 insertions(+), 7 deletions(-) diff --git a/DirectCuts/ControlsMachineButtonUC.xaml.vb b/DirectCuts/ControlsMachineButtonUC.xaml.vb index 0dddfce..2e61c07 100644 --- a/DirectCuts/ControlsMachineButtonUC.xaml.vb +++ b/DirectCuts/ControlsMachineButtonUC.xaml.vb @@ -755,8 +755,17 @@ Public MustInherit Class MachineButton EgtLuaSetGlobNumVar("CMD.R1", dR1) EgtLuaSetGlobNumVar("CMD.R2", dR2) EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches()) + + ' versione 2.6h1 + Dim sCurrTable As String = String.Empty + Dim nCuttTable As Integer = 1 + EgtGetTableName(sCurrTable) + If sCurrTable <> "MainTab" Then nCuttTable = 2 + EgtLuaSetGlobIntVar("CMD.TABLE", nCuttTable) + EgtLuaCallFunction("CmdString") - ' Leggo variabili + + ' Leggo variabili da file Lua CmdString = String.Empty EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString) b2Start = False diff --git a/DirectCuts/SawTestUC.xaml.vb b/DirectCuts/SawTestUC.xaml.vb index 1e57bf5..9d97258 100644 --- a/DirectCuts/SawTestUC.xaml.vb +++ b/DirectCuts/SawTestUC.xaml.vb @@ -530,6 +530,10 @@ Public Class SawTestUC ElseIf nWSide = MCH_SAW_WS.LEFT Then vtPerp = vtDir vtPerp.Rotate(Vector3d.Z_AX, +90) + Else + m_CurrProjPage.ClearMessage() + ' 91144 = Set machining side: right or left. + m_CurrProjPage.SetInfoMessage(EgtMsg(91144)) End If Dim ptEnd As Point3d = ptStart + vtDir * m_dLen + vtPerp * dThick Dim dLen2 As Double = m_dLen / 2 diff --git a/Machine/AlarmsPageUC.xaml.vb b/Machine/AlarmsPageUC.xaml.vb index bdf59bc..02119d2 100644 --- a/Machine/AlarmsPageUC.xaml.vb +++ b/Machine/AlarmsPageUC.xaml.vb @@ -1227,7 +1227,7 @@ Public Class AlarmsPageUC ' Errore in tastatura lama Dim MsgBoxError As New EgtMsgBox(m_MainWindow, "", EgtMsg(MSG_DIRECTCUTPAGEUC + 44), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL) EgtOutLog("ToolProbing Command error") - Return + 'Return End If ' Modifico stringa per inserire i newline CmdString = CmdString.Replace("
", Environment.NewLine) @@ -1240,7 +1240,7 @@ Public Class AlarmsPageUC ' Verifico se sono connesso alla macchina prima di continuare If Not m_MainWindow.m_bNCLink Then EgtOutLog("ToolProbing NcLink error") - Return + 'Return End If ' Leggo nome variabile tastatura eseguita Dim ProbingStateNameVar As String = String.Empty @@ -1253,7 +1253,7 @@ Public Class AlarmsPageUC ' Errore in tastatura lama Dim MsgBoxError As New EgtMsgBox(m_MainWindow, "", EgtMsg(MSG_DIRECTCUTPAGEUC + 44), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL) EgtOutLog("ToolProbing Send error") - Return + 'Return End If m_MainWindow.m_CurrentProjectPageUC.ClearMessage() ' Se fanuc passo in modalità AUTO e attivo @@ -1265,7 +1265,7 @@ Public Class AlarmsPageUC System.Threading.Thread.Sleep(300) m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart() ' Creo MsgBox di attesa - Dim MsgBoxStateInfo As New EgtMsgBox(m_MainWindow, EgtMsg(MSG_DIRECTCUTPAGEUC + 41), EgtMsg(MSG_DIRECTCUTPAGEUC + 42), True, EgtMsgBox.Buttons.CANCEL, EgtMsgBox.Icons.NULL) + Dim MsgBoxStateInfo As New EgtMsgBox(m_MainWindow, String.Format(EgtMsg(MSG_DIRECTCUTPAGEUC + 41), ToolForProbing.m_ToolName), EgtMsg(MSG_DIRECTCUTPAGEUC + 42), True, EgtMsgBox.Buttons.CANCEL, EgtMsgBox.Icons.NULL) m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0 ' Definisco flag tastatura Dim bProbingOk As Boolean = False diff --git a/Machine/CurrentMachine.vb b/Machine/CurrentMachine.vb index 94d234d..2698837 100644 --- a/Machine/CurrentMachine.vb +++ b/Machine/CurrentMachine.vb @@ -1662,7 +1662,9 @@ Public Class CurrentMachine Dim dToolDiam As Double = 0 EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) ' Confronto con massimo ammesso - Return (dToolDiam <= dMaxSawDiamForProbe) + Dim bOk As Boolean = dToolDiam <= dMaxSawDiamForProbe + If Not bOk Then EgtOutLog("WARNING: Saw diameter to big for porbing") + Return bOk End Function Friend Function GetPrivateProfileMaterial( diff --git a/Project/ProjectMgrUC.xaml.vb b/Project/ProjectMgrUC.xaml.vb index 2d794a1..70f758b 100644 --- a/Project/ProjectMgrUC.xaml.vb +++ b/Project/ProjectMgrUC.xaml.vb @@ -821,7 +821,7 @@ Public Class ProjectMgrUC End If ' avvio programma solo se DoubleProg If (GetPrivateProfileInt(S_GENERAL, K_STARTPROGRAM, 0, m_MainWindow.GetIniFile()) <> 0 And bDoubleProg) And - (bSendToAre1 Or bSendToAre2) Then + (bSendToAre1 Or bSendToAre2) Then Dim MyCicloStartWD As New CicloStartWD(m_MainWindow) MyCicloStartWD.ShowDialog() End If From 123d6118e91643702d9dcbf1eba08a17347f1977 Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Wed, 21 Aug 2024 16:11:33 +0200 Subject: [PATCH 05/12] Correzione gestion uscita in caso di errore --- Machine/AlarmsPageUC.xaml.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Machine/AlarmsPageUC.xaml.vb b/Machine/AlarmsPageUC.xaml.vb index 02119d2..23f781e 100644 --- a/Machine/AlarmsPageUC.xaml.vb +++ b/Machine/AlarmsPageUC.xaml.vb @@ -1227,7 +1227,7 @@ Public Class AlarmsPageUC ' Errore in tastatura lama Dim MsgBoxError As New EgtMsgBox(m_MainWindow, "", EgtMsg(MSG_DIRECTCUTPAGEUC + 44), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL) EgtOutLog("ToolProbing Command error") - 'Return + Return End If ' Modifico stringa per inserire i newline CmdString = CmdString.Replace("
", Environment.NewLine) @@ -1240,7 +1240,7 @@ Public Class AlarmsPageUC ' Verifico se sono connesso alla macchina prima di continuare If Not m_MainWindow.m_bNCLink Then EgtOutLog("ToolProbing NcLink error") - 'Return + Return End If ' Leggo nome variabile tastatura eseguita Dim ProbingStateNameVar As String = String.Empty @@ -1253,7 +1253,7 @@ Public Class AlarmsPageUC ' Errore in tastatura lama Dim MsgBoxError As New EgtMsgBox(m_MainWindow, "", EgtMsg(MSG_DIRECTCUTPAGEUC + 44), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL) EgtOutLog("ToolProbing Send error") - 'Return + Return End If m_MainWindow.m_CurrentProjectPageUC.ClearMessage() ' Se fanuc passo in modalità AUTO e attivo From 253e92b111157a728f4ed26af3e9223a438c1094 Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Wed, 4 Sep 2024 16:12:12 +0200 Subject: [PATCH 06/12] Aggiorno disegno della fase corrente nella pagina Vacuum --- CadCuts/MoveRawPartPage.xaml.vb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CadCuts/MoveRawPartPage.xaml.vb b/CadCuts/MoveRawPartPage.xaml.vb index 1a9e235..45907fa 100644 --- a/CadCuts/MoveRawPartPage.xaml.vb +++ b/CadCuts/MoveRawPartPage.xaml.vb @@ -127,11 +127,10 @@ Public Class MoveRawPartPage UnloadPartsBtn.Content = "Go to MOVE part" ' altrimenti, aggiorno visualizzazione ElseIf Not m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then - EgtDraw() UnloadPartsBtn.Content = "Go to UNLOAD part" End If '---------------------------- AUX TABLE ---------------------------- - + EgtDraw() ' Carico i parametri di movimento m_dStep = GetPrivateProfileDouble(S_RAWMOVE, K_RAWSTEP, 50, m_MainWindow.GetIniFile()) ' Ricavo la lunghezza del baffo di taglio From 206af485395dd1631c45e3cf422c672dcf29ddd5 Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Thu, 5 Sep 2024 11:35:48 +0200 Subject: [PATCH 07/12] Correzione corse asse Z laser --- MainWindow.xaml.vb | 4 ++-- My Project/AssemblyInfo.vb | 4 ++-- Project/ProjectMgrUC.xaml.vb | 11 +++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/MainWindow.xaml.vb b/MainWindow.xaml.vb index 2d7c3d7..d01e5ac 100644 --- a/MainWindow.xaml.vb +++ b/MainWindow.xaml.vb @@ -343,8 +343,8 @@ Class MainWindow ' Verifico abilitazione nesting automatico m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey) ' Recupero opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(9423, 2607, 1, m_nKeyLevel) And - EgtGetKeyOptions(9423, 2607, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(9423, 2609, 1, m_nKeyLevel) And + EgtGetKeyOptions(9423, 2609, 1, m_nKeyOptions) ' Verifico abilitazione prodotto Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE) ' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 6d4c1df..2e2d49f 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -62,5 +62,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/Project/ProjectMgrUC.xaml.vb b/Project/ProjectMgrUC.xaml.vb index 70f758b..86b1155 100644 --- a/Project/ProjectMgrUC.xaml.vb +++ b/Project/ProjectMgrUC.xaml.vb @@ -399,6 +399,10 @@ Public Class ProjectMgrUC EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2) ' Forzo B90 dB1 = 90 + ' Forzo la pozione in Z alla quota di Home + Dim dHomeZ As Double = 0 + EgtGetAxisHomePos("Z", dHomeZ) + ptMid.z = dHomeZ Else ' Se utensile speciale If CurrTestTool.ToolType = MCH_TY.MILL_STD Or CurrTestTool.ToolType = MCH_TY.DRILL_STD Then @@ -424,6 +428,7 @@ Public Class ProjectMgrUC ' verifica assi lineari EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat) If nStat <> 0 Then + EgtOutLog("Out of stroke: " & nStat) vtDirT = -vtDirT ptMid -= vtDirT * dThick If CurrTestTool.ToolIsSaw Then @@ -455,6 +460,12 @@ Public Class ProjectMgrUC End If ' calcolo la posizione degli assi lineari X, Y, Z ( correggere il punto ptMid.z sommando il raggio utensile) EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ) + + ' verifica assi lineari + EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat) + If nStat <> 0 Then + EgtOutLog("2nd attemp out of stroke: " & nStat) + End If End If '--------------------------- Comunico i movimenti in origine macchina al CN ---------------------------------------- From 3667ecb3b7755377dbc8b5dddbfcb6ffdfff24f0 Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Thu, 5 Sep 2024 19:33:04 +0200 Subject: [PATCH 08/12] KeyDown Cancel per rimozione pezzi in RawMove --- CadCuts/MoveRawPartPage.xaml.vb | 6 ++++++ Project/CurrentProjectPageUC.xaml.vb | 5 +++++ Project/ProjectMgrUC.xaml.vb | 9 +++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CadCuts/MoveRawPartPage.xaml.vb b/CadCuts/MoveRawPartPage.xaml.vb index 45907fa..ada5235 100644 --- a/CadCuts/MoveRawPartPage.xaml.vb +++ b/CadCuts/MoveRawPartPage.xaml.vb @@ -859,6 +859,12 @@ Public Class MoveRawPartPage Return bOk End Function + Private Sub RemovePart_KeyCancel(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles m_CurrProjPage.OnKeyCancelDownScene + If e.KeyCode = System.Windows.Forms.Keys.Delete Then + RemovePartBtn_Click(Nothing, Nothing) + End If + End Sub + Private Sub RemovePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemovePartBtn.Click Dim nRawId As Integer = EgtGetFirstSelectedObj() While nRawId <> GDB_ID.NULL diff --git a/Project/CurrentProjectPageUC.xaml.vb b/Project/CurrentProjectPageUC.xaml.vb index 3097720..620e3f7 100644 --- a/Project/CurrentProjectPageUC.xaml.vb +++ b/Project/CurrentProjectPageUC.xaml.vb @@ -10,6 +10,7 @@ Public Class CurrentProjectPageUC Friend Event OnMouseDownScene_DoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs) Friend Event OnMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Friend Event OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) + Friend Event OnKeyCancelDownScene(sender As Object, e As System.Windows.Forms.KeyEventArgs) ' Riferimento alla MainWindow Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow) ' Dichiarazione delle Page UserControl @@ -353,6 +354,10 @@ Public Class CurrentProjectPageUC SetInfoMessage(DistToString(vtDist)) End Sub + Private Sub OnMyKeyCancelDownScene(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles CurrentProjectScene.KeyDown + RaiseEvent OnKeyCancelDownScene(sender, e) + End Sub + ' Gestione progetto Friend Sub SetNextProjectIndex() diff --git a/Project/ProjectMgrUC.xaml.vb b/Project/ProjectMgrUC.xaml.vb index 86b1155..5777d67 100644 --- a/Project/ProjectMgrUC.xaml.vb +++ b/Project/ProjectMgrUC.xaml.vb @@ -333,6 +333,10 @@ Public Class ProjectMgrUC EgtTdbGetCurrToolParam(MCH_TP.DIAM, dHeight) ' Raggio lama dHeight = dHeight / 2 + ElseIf CurrTestTool.ToolIsLaser Then + ' Raggio + dThick = 0 + dHeight = 0 Else ' Diametro FRESA/FORETTO (l'altezza non serve: posizione calcolata tiene conto del Tip Tool) EgtTdbGetCurrToolParam(MCH_TP.DIAM, dThick) @@ -399,7 +403,7 @@ Public Class ProjectMgrUC EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2) ' Forzo B90 dB1 = 90 - ' Forzo la pozione in Z alla quota di Home + ' Forzo la pozione in Z alla quota di Home (per evitare l'errore di fine corsa asse Z) Dim dHomeZ As Double = 0 EgtGetAxisHomePos("Z", dHomeZ) ptMid.z = dHomeZ @@ -1008,7 +1012,8 @@ Public Class ProjectMgrUC 'EgtLuaSetGlobNumVar("CMD.SAWTH", dThick) EgtTdbSetCurrTool(SelTestTool.ToolName) - EgtLuaSetGlobStringVar("CMD.TLNAME", SelTestTool.ToolAlias) + EgtLuaSetGlobStringVar("CMD.TLNAME", SelTestTool.ToolName) + EgtLuaSetGlobStringVar("CMD.TLALIAS", SelTestTool.ToolAlias) Dim dThick As Double = 0 EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick) EgtLuaSetGlobNumVar("CMD.SAWTH", dThick) From da4ddb2a7fee5cdcf6fce5f7da5c11b69d638a77 Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Thu, 12 Sep 2024 16:47:36 +0200 Subject: [PATCH 09/12] Inserito valore default in configurazione parametri booleani SiemensOne --- Constants/ConstMachIni.vb | 1 + DirectCuts/ManualAxesMoveUC.xaml.vb | 35 ++++++++++++++++++ NcComm/CNCommunication.vb | 54 +++++++++++++++++++++++++--- NcComm/CN_generico.vb | 4 ++- Project/CurrentProjectPageUC.xaml.vb | 2 +- 5 files changed, 90 insertions(+), 6 deletions(-) diff --git a/Constants/ConstMachIni.vb b/Constants/ConstMachIni.vb index fa48417..b449bd4 100644 --- a/Constants/ConstMachIni.vb +++ b/Constants/ConstMachIni.vb @@ -129,6 +129,7 @@ Public Const K_SPOTLIGHT1 As String = "SpotLight1" Public Const K_SPOTLIGHT2 As String = "SpotLight2" Public Const K_NAXES As String = "nAxes" + Public Const K_RESETSTATUS As String = "ResetStatus" ' Nuove variabili Public Const K_SPEEDHOLD As String = "SpeedHold" Public Const K_XYJOG As String = "XYJog" diff --git a/DirectCuts/ManualAxesMoveUC.xaml.vb b/DirectCuts/ManualAxesMoveUC.xaml.vb index 55c8150..8dac66b 100644 --- a/DirectCuts/ManualAxesMoveUC.xaml.vb +++ b/DirectCuts/ManualAxesMoveUC.xaml.vb @@ -53,14 +53,43 @@ Public Class ManualAxesMoveUC ' Imposto check per considerare spessore lama L1SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove L2SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove + + ' Aggiorno visualizzazione + SetMachineInCurrPos() + EgtDraw() + m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True End Sub Private Sub ManualAxesMove_UnLoaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded m_Timer.Stop() m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove = (L1SawThChBx.IsEnabled And L1SawThChBx.IsChecked) Or (L2SawThChBx.IsEnabled And L2SawThChBx.IsChecked) + ' Nascondo la macchina + m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False + EgtSetMachineLook(MCH_LOOK.TAB) + EgtDraw() End Sub + Private Function SetMachineInCurrPos() As Boolean + ' Recupero la posizione macchina + Dim dL1, dL2, dL3, dR1, dR2 As Double + If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return False + ' Recupero il nome degli assi macchina + Dim sL1 As String = String.Empty + Dim sL2 As String = String.Empty + Dim sL3 As String = String.Empty + Dim sR1 As String = String.Empty + Dim sR2 As String = String.Empty + If Not m_MainWindow.m_CNCommunication.GetAxesNames(sL1, sL2, sL3, sR1, sR2) Then Return False + ' Visualizzo macchina in posizione + EgtSetAxisPos(sL1, dL1) + EgtSetAxisPos(sL2, dL2) + EgtSetAxisPos(sL3, dL3) + EgtSetAxisPos(sR1, dR1) + EgtSetAxisPos(sR2, dR2) + Return True + End Function + Private Sub UpdateAxesNames() Dim sL1 As String = String.Empty Dim sL2 As String = String.Empty @@ -125,11 +154,16 @@ Public Class ManualAxesMoveUC Private Sub Timer_tick() UpdateAxesNames() UpdateUseSawThickness() + ' Aggiorno posizione macchina in disegno + SetMachineInCurrPos() + ' Aggiorno il disegno + EgtDraw() End Sub Private m_MoveClicked As Boolean = False Private Sub XXBtn_Click(sender As Object, e As MouseButtonEventArgs) Handles L1Btn.PreviewMouseDown, L2Btn.PreviewMouseDown, L3Btn.PreviewMouseDown, R1Btn.PreviewMouseDown, R2Btn.PreviewMouseDown If e.ClickCount > 1 OrElse m_MoveClicked Then + EgtOutLog(" → Hold on! Do not click compulsively.") Return End If m_MoveClicked = True @@ -216,6 +250,7 @@ Public Class ManualAxesMoveUC Private Sub SiemensMoveAxis(CurrentBtn As Button) ' leggo se stato reset If Not m_CN.bResetState Then + EgtOutLog("Reset status is 'False', is denied to execute file '\DirectCmd\AxesMove.lua'.") m_MoveClicked = False Return End If diff --git a/NcComm/CNCommunication.vb b/NcComm/CNCommunication.vb index 0fbaa32..3ec4fc3 100644 --- a/NcComm/CNCommunication.vb +++ b/NcComm/CNCommunication.vb @@ -389,6 +389,9 @@ Public Class CNCommunication m_CN.SetCnDataVar(CN_generico.CnData.VacuumOff, sVal) GetPrivateProfileString(S_NCDATA, K_BYPASSTATE, "", sVal, m_MainWindow.GetMachIniFile()) m_CN.SetCnDataVar(CN_generico.CnData.BypassState, sVal) + ' ver 2.6i1 : nuova gestione SiemensONE + GetPrivateProfileString(S_NCDATA, K_RESETSTATUS, "", sVal, m_MainWindow.GetMachIniFile()) + m_CN.SetCnDataVar(CN_generico.CnData.ResetStatus, sVal) ' nuove variabili: stato dei nuovi pulsanti nVal = GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) @@ -485,7 +488,12 @@ Public Class CNCommunication End If nVarType = VarType.TBoolean m_CN.DVariables_Read_Subscription(sItem(1), nVarType, nIndexArrayBool) - ListReferenceIndex.Add(New RefereceFlagSimens(nIndexArrayBool, ItemIndex, nVarType)) + Dim NewRefFlafSiemens As RefereceFlagSimens = New RefereceFlagSimens(nIndexArrayBool, ItemIndex, nVarType) + If sItem.Count = 3 Then + ' forzo la lettura della variabile di default (ignoro lo stato letto da CN) + NewRefFlafSiemens.DefaultValue = sItem(2) + End If + ListReferenceIndex.Add(NewRefFlafSiemens) nIndexArrayBool += 1 Case 1 If nIndexArrayInt > 14 Then @@ -540,7 +548,12 @@ Public Class CNCommunication Next nVarType = VarType.TInteger m_CN.DVariables_Read_Subscription(sVarName, nVarType, nIndexArrayInt_1) - ListReferenceIndex.Add(New RefereceFlagSimens(nIndexArrayInt_1, ItemIndex, nVarType, sIndexBit)) + Dim NewRefFlafSiemens As RefereceFlagSimens = New RefereceFlagSimens(nIndexArrayInt_1, ItemIndex, nVarType, sIndexBit) + If sItem.Count = 3 Then + ' forzo la lettura della variabile di default (ignoro lo stato letto da CN) + NewRefFlafSiemens.DefaultValue = sItem(2) + End If + ListReferenceIndex.Add(NewRefFlafSiemens) If Not bFound Then nIndexArrayInt += 1 ListIndexToVar.Add(New IndexArrayToBit(nIndexArrayInt_1, sVarName.Trim)) @@ -1214,6 +1227,7 @@ Public Class CNCommunication Dim nFlag As Integer = ListReferenceIndex(IndxLst).FlagIndex Dim nIndex As Integer = ListReferenceIndex(IndxLst).SiemnesArrayIndex Dim nIndexBit As Integer = ListReferenceIndex(IndxLst).IndexBit + Dim sDefaultValue As String = ListReferenceIndex(IndxLst).DefaultValue Dim b_temp As Boolean = False Dim n_temp As Integer = 0 Dim l_temp As Long = 0.0 @@ -1221,11 +1235,31 @@ Public Class CNCommunication ' leggo il valore caricato Select Case nType Case VarType.TBoolean - b_temp = m_CN.b_data(nIndex) + If Not String.IsNullOrEmpty(sDefaultValue) Then + ' ver 2.6i1 + Try + b_temp = CBool(sDefaultValue) + Catch ex As Exception + EgtOutLog("Default boolean value of flag " & nFlag.ToString & " is not Boolean, verify the form: True or true or 1, False or false or 0") + b_temp = m_CN.b_data(nIndex) + End Try + Else + b_temp = m_CN.b_data(nIndex) + End If Case VarType.TInteger n_temp = m_CN.n_data(nIndex) ' VENTOSE: lettura dato da intero Bit a Bit (ver_2.6h1), ritorno un Boolean - b_temp = ReadBit(nIndexBit, n_temp) + If Not String.IsNullOrEmpty(sDefaultValue) Then + ' ver 2.6i1 + Try + b_temp = CBool(sDefaultValue) + Catch ex As Exception + EgtOutLog("Default bit value of flag " & nFlag.ToString & " is not Boolean, verify the form: True or true or 1, False or false or 0") + b_temp = ReadBit(nIndexBit, n_temp) + End Try + Else + b_temp = ReadBit(nIndexBit, n_temp) + End If Case VarType.TLong l_temp = m_CN.l_data(nIndex) Case VarType.TDouble @@ -1343,6 +1377,8 @@ Public Class CNCommunication Case CN_generico.CnData.nAxes ' (55) m_CN.n_index_is_G24_active = nIndex m_CN.b5AxesState = b_temp + Case CN_generico.CnData.ResetStatus ' (56) + m_CN.bResetState = b_temp End Select Next @@ -1673,6 +1709,7 @@ Public Class RefereceFlagSimens Private m_TypeArray As Integer ' Opzionale Private m_IndexBit As Integer = -1 + Private m_DefaultValue As String = "" Public Property SiemnesArrayIndex As Integer Get @@ -1710,6 +1747,15 @@ Public Class RefereceFlagSimens End Set End Property + Public Property DefaultValue As String + Get + Return m_DefaultValue + End Get + Set(value As String) + m_DefaultValue = value + End Set + End Property + Sub New(IndArray As Integer, Flag As Integer, nType As Integer) m_SiemnesArrayIndex = IndArray m_FlagIndex = Flag diff --git a/NcComm/CN_generico.vb b/NcComm/CN_generico.vb index 49d2d61..613f963 100644 --- a/NcComm/CN_generico.vb +++ b/NcComm/CN_generico.vb @@ -8,7 +8,7 @@ Public MustInherit Class CN_generico Public Const MAX_VAR As Short = 100 Public Const MAX_VALUES As Short = 9 ' Max. index to read the data from the FXServer array Public Const MAX_TOOLS As Short = 100 - Public Const NUM_DATA = 56 ' Numero di dati del CN (Speed,Feed,...) + Public Const NUM_DATA = 57 ' Numero di dati del CN (Speed,Feed,...) Public m_NewVariable As Boolean = False ' per scrittura delle vairbaili Apllication del PLC @@ -72,6 +72,8 @@ Public MustInherit Class CN_generico EnablePC = 54 nAxes = 55 + + ResetStatus = 56 End Enum Public Enum Type As Short diff --git a/Project/CurrentProjectPageUC.xaml.vb b/Project/CurrentProjectPageUC.xaml.vb index 620e3f7..158c59c 100644 --- a/Project/CurrentProjectPageUC.xaml.vb +++ b/Project/CurrentProjectPageUC.xaml.vb @@ -523,7 +523,7 @@ Public Class CurrentProjectPageUC ' Sistemazioni finali If nAddTabId = GDB_ID.NULL Then Return False EgtSetName(nAddTabId, MACH_ADD_TABLE) - EgtSetColor(nAddTabId, New Color3d(150, 75, 0, 100), True) + If nRefAddTabId = GDB_ID.NULL Then EgtSetColor(nAddTabId, New Color3d(150, 75, 0, 100), True) EgtSetInfo(nAddTabId, KEY_ADD_TABLE, dAddTable) Return True End Function From 3f769c49dacfa769fc503b116ab1cf2dbb3e1efc Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Wed, 25 Sep 2024 12:25:34 +0200 Subject: [PATCH 10/12] Correzione visualizzazione pezzi in parcheggio dopo reset in VeinMatch3D --- Machine/CurrentMachine.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Machine/CurrentMachine.vb b/Machine/CurrentMachine.vb index 2698837..074f9f9 100644 --- a/Machine/CurrentMachine.vb +++ b/Machine/CurrentMachine.vb @@ -1663,7 +1663,7 @@ Public Class CurrentMachine EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) ' Confronto con massimo ammesso Dim bOk As Boolean = dToolDiam <= dMaxSawDiamForProbe - If Not bOk Then EgtOutLog("WARNING: Saw diameter to big for porbing") + If Not bOk Then EgtOutLog("WARNING: Saw diameter to big for probing") Return bOk End Function From a1ad658f27acbbbbe234d96efd003c5efcdecbe8 Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Tue, 8 Oct 2024 18:28:48 +0200 Subject: [PATCH 11/12] Correzione DoubleClick OnOff scena --- CadCuts/MoveRawPartPage.xaml.vb | 3 +- CadCuts/NestPageUC.xaml.vb | 4 +++ CadCuts/SplitPageUC.xaml.vb | 60 ++++++++++++++++----------------- MainWindow.xaml.vb | 4 +-- My Project/AssemblyInfo.vb | 4 +-- 5 files changed, 40 insertions(+), 35 deletions(-) diff --git a/CadCuts/MoveRawPartPage.xaml.vb b/CadCuts/MoveRawPartPage.xaml.vb index ada5235..6dafd48 100644 --- a/CadCuts/MoveRawPartPage.xaml.vb +++ b/CadCuts/MoveRawPartPage.xaml.vb @@ -932,6 +932,7 @@ Public Class MoveRawPartPage ' Mantengo la fase che è stata creata e passo a gestire solo la visualizzazione dei bottoni RefreshVisibility() EgtZoom(ZM.ALL, True) + End Sub Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed @@ -1367,7 +1368,7 @@ Public Class MoveRawPartPage Return End If - ' ------- VISUALIZZAZIONE ------- + ' ------- VISUALIZZAZIONE (navigazione tra le fasi) ------- If m_SplitPage.m_bShow Then ' verifico se la fase successiva è uno scarico frontale If NextOperationIsUnloading(m_nCurrDisposition) Then diff --git a/CadCuts/NestPageUC.xaml.vb b/CadCuts/NestPageUC.xaml.vb index 9a9fd86..c22838a 100644 --- a/CadCuts/NestPageUC.xaml.vb +++ b/CadCuts/NestPageUC.xaml.vb @@ -220,17 +220,21 @@ Public Class NestPageUC m_nCountSpot = 0 m_nCountSpotCUT = 0 End If + EgtOutLog("Numero di SPOT caricati da OFFICE: " & m_nCountSpot.ToString) ' Se nel progetto non sono inseriti punti SpotReg disabilito i comandi If m_nCountSpot < 1 Then UG0_Reg.IsEnabled = False UG1_Reg.IsEnabled = False + EgtOutLog(" Abilito comandi gestione SPOT") Else UG0_Reg.IsEnabled = True UG1_Reg.IsEnabled = True + EgtOutLog(" Disabilito comandi gestione SPOT") End If ' Se nel progetto non sono inseriti punti SpotRegCUT provvedo ad aggiungerli If m_nCountSpotCUT < 1 Then InsertSpotRegistration() + EgtOutLog(" Creo SPOT_CUT") End If ' Se necessario riabilito impostazione modificato diff --git a/CadCuts/SplitPageUC.xaml.vb b/CadCuts/SplitPageUC.xaml.vb index aabf014..954caef 100644 --- a/CadCuts/SplitPageUC.xaml.vb +++ b/CadCuts/SplitPageUC.xaml.vb @@ -457,21 +457,7 @@ Public Class SplitPageUC #End Region ' Bridge Private Sub OnMyMouseDownScene_DoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene_DoubleClick - If MachiningLsBx.SelectedItems.Count = 1 Then - OnMyMouseDownScene(sender, e) - Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem) - Dim nI As Integer = x.Ind - If m_MachiningList(nI).m_bEnabled Then - m_MachiningList(nI).m_bEnabled = False - x.bIsActive = False - Else - m_MachiningList(nI).m_bEnabled = True - x.bIsActive = True - End If - ColorMachining(m_MachiningList(nI)) - ColorNumberArrow(nI) - EgtDraw() - End If + OnOffCut() End Sub Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene @@ -756,20 +742,7 @@ Public Class SplitPageUC Private Sub MachiningLsBx_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles MachiningLsBx.MouseDoubleClick If m_IsCtrlKeyDown Or m_IsShiftKeyDown Then Return - If MachiningLsBx.SelectedItems.Count = 1 Then - Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem) - Dim nI As Integer = x.Ind - If m_MachiningList(nI).m_bEnabled Then - m_MachiningList(nI).m_bEnabled = False - x.bIsActive = False - Else - m_MachiningList(nI).m_bEnabled = True - x.bIsActive = True - End If - ColorMachining(m_MachiningList(nI)) - ColorNumberArrow(nI) - EgtDraw() - End If + OnOffCut() End Sub Private Sub MoveUpBtn_Click(sender As Object, e As RoutedEventArgs) Handles MoveUpBtn.Click @@ -1890,7 +1863,7 @@ Public Class SplitPageUC End Sub Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click - ' ------- VISUALIZZAZIONE ------- + ' ------- VISUALIZZAZIONE (navigazione tra le fasi) ------- If m_bShow Then Dim CurrDisposition As Integer = EgtGetPhaseDisposition(m_nCurrPhase) ' recupero l'operazione successiva @@ -2199,6 +2172,33 @@ Public Class SplitPageUC End Sub + Private Sub OnOffCut() + If MachiningLsBx.SelectedItems.Count = 1 Then + Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem) + Dim nI As Integer = x.Ind + If m_MachiningList(nI).m_bEnabled Then + m_MachiningList(nI).m_bEnabled = False + x.bIsActive = False + Else + m_MachiningList(nI).m_bEnabled = True + x.bIsActive = True + End If + ColorMachining(m_MachiningList(nI)) + ColorNumberArrow(nI) + EgtDraw() + ' Imposto flag di modifica + m_bModified = True + ' recupero l'elenco degli elementi selezionati + Dim ItemList As New List(Of NameIdLsBxItem) + For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems + ItemList.Add(Item) + Next + VerifyHomogenousMachining(ItemList) + ' Abilitazione bottone Next + EnableButtons() + End If + End Sub + Private Sub VerifyHomogenousMachining(ItemList As List(Of NameIdLsBxItem)) If IsNothing(ItemList) OrElse ItemList.Count = 0 Then m_MainWindow.m_CurrentProjectPageUC.ClearMessage() diff --git a/MainWindow.xaml.vb b/MainWindow.xaml.vb index d01e5ac..df3e70e 100644 --- a/MainWindow.xaml.vb +++ b/MainWindow.xaml.vb @@ -343,8 +343,8 @@ Class MainWindow ' Verifico abilitazione nesting automatico m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey) ' Recupero opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(9423, 2609, 1, m_nKeyLevel) And - EgtGetKeyOptions(9423, 2609, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(9423, 2610, 1, m_nKeyLevel) And + EgtGetKeyOptions(9423, 2610, 1, m_nKeyOptions) ' Verifico abilitazione prodotto Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE) ' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 2e2d49f..d9904cc 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -62,5 +62,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + From ead6bcec6dd29845db734c4a0ab0d3b9ee3555c9 Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Wed, 9 Oct 2024 16:33:45 +0200 Subject: [PATCH 12/12] Gestione deselezione tagli in pagina split --- CadCuts/NestPageUC.xaml.vb | 4 ---- CadCuts/SplitPageUC.xaml.vb | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CadCuts/NestPageUC.xaml.vb b/CadCuts/NestPageUC.xaml.vb index c22838a..9a9fd86 100644 --- a/CadCuts/NestPageUC.xaml.vb +++ b/CadCuts/NestPageUC.xaml.vb @@ -220,21 +220,17 @@ Public Class NestPageUC m_nCountSpot = 0 m_nCountSpotCUT = 0 End If - EgtOutLog("Numero di SPOT caricati da OFFICE: " & m_nCountSpot.ToString) ' Se nel progetto non sono inseriti punti SpotReg disabilito i comandi If m_nCountSpot < 1 Then UG0_Reg.IsEnabled = False UG1_Reg.IsEnabled = False - EgtOutLog(" Abilito comandi gestione SPOT") Else UG0_Reg.IsEnabled = True UG1_Reg.IsEnabled = True - EgtOutLog(" Disabilito comandi gestione SPOT") End If ' Se nel progetto non sono inseriti punti SpotRegCUT provvedo ad aggiungerli If m_nCountSpotCUT < 1 Then InsertSpotRegistration() - EgtOutLog(" Creo SPOT_CUT") End If ' Se necessario riabilito impostazione modificato diff --git a/CadCuts/SplitPageUC.xaml.vb b/CadCuts/SplitPageUC.xaml.vb index 954caef..b6a1968 100644 --- a/CadCuts/SplitPageUC.xaml.vb +++ b/CadCuts/SplitPageUC.xaml.vb @@ -571,6 +571,11 @@ Public Class SplitPageUC m_nDragInd = -1 m_nDragType = 0 m_nSelected = GDB_ID.NULL + If Not IsNothing(MachiningLsBx.SelectedItem) Then + MarkMachining(MachiningLsBx.SelectedItem.Ind, False) + EgtDraw() + End If + MachiningLsBx.SelectedIndex = -1 End If End Sub @@ -2196,6 +2201,8 @@ Public Class SplitPageUC VerifyHomogenousMachining(ItemList) ' Abilitazione bottone Next EnableButtons() + Else + End If End Sub