diff --git a/EgtCAM5.vbproj b/EgtCAM5.vbproj
index 3e495bd..97caa1a 100644
--- a/EgtCAM5.vbproj
+++ b/EgtCAM5.vbproj
@@ -77,6 +77,7 @@
Resources\EgtCAM5.ico
+
..\..\EgtProg\DllD32\EgtUILib.dll
diff --git a/IniFile.vb b/IniFile.vb
index 5c97c8f..02c4e30 100644
--- a/IniFile.vb
+++ b/IniFile.vb
@@ -17,10 +17,10 @@ Module IniFile
Friend m_ProjectSceneContext As Integer = 0
Friend m_bScriptRunning As Boolean = False
Friend m_bStopScript As Boolean = False
-
- ' TOOLS DB PAGE
- Friend m_sDbsCurrMachIniFilePath As String 'IniFile della macchina correntemente selezionata nella pagina di Db selezionata (Tools o Machinings)
- Friend m_sTdbCurrMachToolsDirPath As String
+ ' Current Machine
+ Friend m_sMachineName As String
+ Friend m_sCurrMachIniFilePath As String
+ Friend m_sCurrMachToolsDirPath As String
' Variabile che contiene la path della cartella che contiene i ToolMaker
Friend m_sToolMakersDir As String = String.Empty
' Variabile che contiene il contesto della scena presente nel database utensili
diff --git a/MachiningsDbWindow/MachiningsDbView.xaml b/MachiningsDbWindow/MachiningsDbView.xaml
index d82e2de..58561fc 100644
--- a/MachiningsDbWindow/MachiningsDbView.xaml
+++ b/MachiningsDbWindow/MachiningsDbView.xaml
@@ -8,7 +8,7 @@
TitleBarBrush="{StaticResource EgaltechBlue1}"
BorderBrush="{StaticResource EgaltechBlue1}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsMovable="False" IsResizable="False"
- IsMinimizable="False" WindowStartupLocation="CenterScreen">
+ IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False">
diff --git a/MachiningsDbWindow/MachiningsDbViewModel.vb b/MachiningsDbWindow/MachiningsDbViewModel.vb
index e08fade..a98160b 100644
--- a/MachiningsDbWindow/MachiningsDbViewModel.vb
+++ b/MachiningsDbWindow/MachiningsDbViewModel.vb
@@ -413,25 +413,25 @@ Namespace EgtCAM5
'''
Private Function ReadActiveMachiningsFamilies() As MachiningsType()
Dim ActiveMachiningsFamiliesList As New List(Of MachiningsType)
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_DRILLING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_DRILLING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.DRILLING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 1)})
End If
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SAWING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 2)})
End If
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MILLING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MILLING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.MILLING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 3)})
End If
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_POCKETING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_POCKETING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.POCKETING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 4)})
End If
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MORTISING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MORTISING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.MORTISING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 5)})
End If
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWROUGHING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWROUGHING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SAWROUGHING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 6)})
End If
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWFINISHING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWFINISHING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SAWFINISHING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 7)})
End If
Return ActiveMachiningsFamiliesList.ToArray
diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb
index c7d54ca..b3c8423 100644
--- a/My Project/AssemblyInfo.vb
+++ b/My Project/AssemblyInfo.vb
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
'
-
-
+
+
diff --git a/ProjectPage/DbPanel/DbPanelViewModel.vb b/ProjectPage/DbPanel/DbPanelViewModel.vb
index 3a67e47..92fbb4c 100644
--- a/ProjectPage/DbPanel/DbPanelViewModel.vb
+++ b/ProjectPage/DbPanel/DbPanelViewModel.vb
@@ -37,6 +37,7 @@ Namespace EgtCAM5
ToolDbWindow.Height = 614
ToolDbWindow.Width = 1024
ToolDbWindow.DataContext = New ToolsDbViewModel
+ ToolDbWindow.Owner = Application.Current.MainWindow
ToolDbWindow.ShowDialog()
End Sub
@@ -71,6 +72,7 @@ Namespace EgtCAM5
MachDbWindow.Height = 614
MachDbWindow.Width = 1024
MachDbWindow.DataContext = New MachiningsDbViewModel
+ MachDbWindow.Owner = Application.Current.MainWindow
MachDbWindow.ShowDialog()
End Sub
diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderViewModel.vb b/ProjectPage/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderViewModel.vb
index e531268..044805b 100644
--- a/ProjectPage/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderViewModel.vb
+++ b/ProjectPage/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderViewModel.vb
@@ -161,25 +161,25 @@ Namespace EgtCAM5
'''
Private Function ReadActiveMachiningsFamilies() As MachiningsType()
Dim ActiveMachiningsFamiliesList As New List(Of MachiningsType)
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_DRILLING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_DRILLING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.DRILLING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 1)})
End If
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SAWING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 2)})
End If
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MILLING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MILLING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.MILLING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 3)})
End If
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_POCKETING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_POCKETING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.POCKETING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 4)})
End If
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MORTISING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MORTISING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.MORTISING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 5)})
End If
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWROUGHING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWROUGHING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SAWROUGHING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 6)})
End If
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWFINISHING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWFINISHING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SAWFINISHING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 7)})
End If
Return ActiveMachiningsFamiliesList.ToArray
diff --git a/StatusBar/StatusBarViewModel.vb b/StatusBar/StatusBarViewModel.vb
index bf38be3..9fb59f0 100644
--- a/StatusBar/StatusBarViewModel.vb
+++ b/StatusBar/StatusBarViewModel.vb
@@ -130,8 +130,8 @@ Namespace EgtCAM5
m_SelectedMachine = value
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
EgtSetCurrMachine(m_SelectedMachine.Name)
- IniFile.m_sDbsCurrMachIniFilePath = m_SelectedMachine.MachineDirPath & "\" & m_SelectedMachine.Name & ".ini"
- IniFile.m_sTdbCurrMachToolsDirPath = m_SelectedMachine.MachineDirPath & "\Tools"
+ IniFile.m_sCurrMachIniFilePath = m_SelectedMachine.MachineDirPath & "\" & m_SelectedMachine.Name & ".ini"
+ IniFile.m_sCurrMachToolsDirPath = m_SelectedMachine.MachineDirPath & "\Tools"
OnPropertyChanged("SelectedMachine")
End If
End Set
diff --git a/ToolsDbWindow/ToolTreeView2.vb b/ToolsDbWindow/ToolTreeView2.vb
index c0b4509..5182593 100644
--- a/ToolsDbWindow/ToolTreeView2.vb
+++ b/ToolsDbWindow/ToolTreeView2.vb
@@ -938,7 +938,7 @@ Public Class ToolTreeViewItem
Else
EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
If IsNgeFile(m_Draw) Then
- If EgtOpenFile(IniFile.m_sTdbCurrMachToolsDirPath & "\" & m_Draw) Then
+ If EgtOpenFile(IniFile.m_sCurrMachToolsDirPath & "\" & m_Draw) Then
EgtSetView(VT.TOP, False)
EgtZoom(ZM.ALL)
Else
@@ -984,7 +984,7 @@ Public Class ToolTreeViewItem
'''
Private Function LoadToolHolder() As String
Dim sHolder As String = String.Empty
- EgtUILib.GetPrivateProfileString(S_TOOLHOLDER, Head & "." & ExitPar.ToString(), "", sHolder, IniFile.m_sDbsCurrMachIniFilePath)
+ EgtUILib.GetPrivateProfileString(S_TOOLHOLDER, Head & "." & ExitPar.ToString(), "", sHolder, IniFile.m_sCurrMachIniFilePath)
If String.IsNullOrWhiteSpace(sHolder) Then
Return String.Empty
Else
@@ -998,7 +998,7 @@ Public Class ToolTreeViewItem
Private Function LoadToolMaker() As Boolean
Dim sMaker As String = String.Empty
- EgtUILib.GetPrivateProfileString(S_TOOLS, ConvertTypeToString(Type), "", sMaker, IniFile.m_sDbsCurrMachIniFilePath)
+ EgtUILib.GetPrivateProfileString(S_TOOLS, ConvertTypeToString(Type), "", sMaker, IniFile.m_sCurrMachIniFilePath)
If String.IsNullOrWhiteSpace(sMaker) Then bToolMakerError = True
' Acquisisce solo il file lua, ma meglio impostare contesto disegno utensili (se ci sono chiamate...)
EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
@@ -1014,9 +1014,9 @@ Public Class ToolTreeViewItem
Case MCH_TY.MILL_STD, MCH_TY.MILL_NOTIP
Return K_MILLMAKER
Case MCH_TY.MORTISE_STD
- Return "StandardMortiseMaker"
+ Return "MortiseMaker"
Case MCH_TY.COMPO
- Return "StandardCompoMaker"
+ Return "CompoMaker"
End Select
Return Nothing
End Function
@@ -1033,14 +1033,14 @@ Public Class ToolTreeViewItem
StringToLen(m_Thick, dThick)
StringToLen(m_MaxMat, dMaxMat)
Select Case Type
- Case MCH_TY.DRILL_STD
+ Case MCH_TY.DRILL_STD, MCH_TY.DRILL_LONG
' imposto dati utensile
EgtLuaSetGlobStringVar("TOOL.TOOLHOLDER", ToolHolder)
EgtLuaSetGlobNumVar("TOOL.TOTLEN", dTotLen)
EgtLuaSetGlobNumVar("TOOL.LEN", dLen)
EgtLuaSetGlobNumVar("TOOL.DIAM", dDiam)
EgtLuaSetGlobNumVar("TOOL.MAXMAT", dMaxMat)
- Case MCH_TY.SAW_STD
+ Case MCH_TY.SAW_STD, MCH_TY.SAW_FLAT
' imposto dati utensile
EgtLuaSetGlobStringVar("TOOL.TOOLHOLDER", ToolHolder)
EgtLuaSetGlobNumVar("TOOL.LEN", dLen)
@@ -1049,7 +1049,7 @@ Public Class ToolTreeViewItem
EgtLuaSetGlobNumVar("TOOL.CORE", dCore)
EgtLuaSetGlobNumVar("TOOL.THICK", dThick)
EgtLuaSetGlobNumVar("TOOL.MAXMAT", dMaxMat)
- Case MCH_TY.MILL_STD
+ Case MCH_TY.MILL_STD, MCH_TY.MILL_NOTIP
' imposto dati utensile
EgtLuaSetGlobStringVar("TOOL.TOOLHOLDER", ToolHolder)
EgtLuaSetGlobNumVar("TOOL.LEN", dLen)
@@ -1063,7 +1063,7 @@ Public Class ToolTreeViewItem
' passo all'ambiente di disegno dell'utensile
EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
' eseguo creazione utensile
- EgtLuaExecLine("CreateTool()")
+ EgtLuaCallFunction("CreateTool")
' recupero errore
Dim nErr As Integer = 999
EgtLuaGetGlobIntVar("TOOL.ERR", nErr)
@@ -1074,7 +1074,9 @@ Public Class ToolTreeViewItem
End Function
Friend Function SaveToolDraw() As Boolean
- If m_Type = MCH_TY.DRILL_STD Or m_Type = MCH_TY.SAW_STD Or m_Type = MCH_TY.MILL_STD Then
+ If m_Type = MCH_TY.DRILL_STD Or m_Type = MCH_TY.DRILL_LONG Or
+ m_Type = MCH_TY.SAW_STD Or m_Type = MCH_TY.SAW_FLAT Or
+ m_Type = MCH_TY.MILL_STD Or m_Type = MCH_TY.MILL_NOTIP Then
' nome e direttorio del file da salvare
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
Dim sDrawName As String = Uuid
@@ -1089,7 +1091,7 @@ Public Class ToolTreeViewItem
nAuxId = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "AUX")
EgtSetStatus(nAuxId, GDB_ST.OFF)
' se lama devo ruotare -90 deg attorno a Z+
- If m_Type = MCH_TY.SAW_STD Then
+ If m_Type = MCH_TY.SAW_STD Or m_Type = MCH_TY.SAW_FLAT Then
EgtRotate(EgtGetFirstGroupInGroup(GDB_ID.ROOT), Point3d.ORIG(), Vector3d.Z_AX(), -90, GDB_RT.GLOB)
End If
' salvo il modello
@@ -1097,7 +1099,7 @@ Public Class ToolTreeViewItem
Dim bOk As Boolean = EgtSaveFile(sPath, NGE.CMPTEXT)
Dim e = EgtGetCurrentContext()
' eseguo controrotazione per lama
- If m_Type = MCH_TY.SAW_STD Then
+ If m_Type = MCH_TY.SAW_STD Or m_Type = MCH_TY.SAW_FLAT Then
EgtRotate(EgtGetFirstGroupInGroup(GDB_ID.ROOT), Point3d.ORIG(), Vector3d.Z_AX(), 90, GDB_RT.GLOB)
End If
' ripristino visualizzazione layer aux
@@ -1444,6 +1446,8 @@ Public Class ToolDrawUUIDConverter
Else
Return value.ToString
End If
+ Else
+ Return Nothing
End If
End Function
diff --git a/ToolsDbWindow/ToolsDbView.xaml b/ToolsDbWindow/ToolsDbView.xaml
index faca663..8b16fdd 100644
--- a/ToolsDbWindow/ToolsDbView.xaml
+++ b/ToolsDbWindow/ToolsDbView.xaml
@@ -8,7 +8,7 @@
TitleBarBrush="{StaticResource EgaltechBlue1}"
BorderBrush="{StaticResource EgaltechBlue1}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsMovable="False" IsResizable="False"
- IsMinimizable="False" WindowStartupLocation="CenterScreen">
+ IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False">
diff --git a/ToolsDbWindow/ToolsDbViewModel.vb b/ToolsDbWindow/ToolsDbViewModel.vb
index a5a87f3..549618d 100644
--- a/ToolsDbWindow/ToolsDbViewModel.vb
+++ b/ToolsDbWindow/ToolsDbViewModel.vb
@@ -306,19 +306,19 @@ Namespace EgtCAM5
'''
Private Function ReadActiveToolsFamilies() As ToolsFamily()
Dim ActiveToolsFamiliesList As New List(Of ToolsFamily)
- If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_DRILLBIT, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_DRILLBIT, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.DRILLBIT, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 1)})
End If
- If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_SAWBLADE, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_SAWBLADE, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.SAWBLADE, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 2)})
End If
- If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MILL, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MILL, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.MILL, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 3)})
End If
- If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MORTISE, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MORTISE, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.MORTISE, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 4)})
End If
- If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_COMPO, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_COMPO, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.COMPO, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 5)})
End If
Return ActiveToolsFamiliesList.ToArray
diff --git a/TopCommandBar/TopCommandBarViewModel.vb b/TopCommandBar/TopCommandBarViewModel.vb
index 9f33763..93fce30 100644
--- a/TopCommandBar/TopCommandBarViewModel.vb
+++ b/TopCommandBar/TopCommandBarViewModel.vb
@@ -84,14 +84,21 @@ Namespace EgtCAM5
If value <> m_MachiningIsChecked Then
m_MachiningIsChecked = value
If value Then
+ Dim bOk As Boolean
Dim nId = EgtGetFirstMachGroup()
If nId <> GDB_ID.NULL Then
- EgtSetCurrMachGroup(nId)
+ bOk = EgtSetCurrMachGroup(nId)
Else
- EgtAddMachGroup("Mach01", "CMS-PF122R8RR")
+ bOk = (EgtAddMachGroup("Mach01") <> GDB_ID.NULL)
+ End If
+ If bOk Then
+ Application.Msn.NotifyColleagues(Application.MACHININGMODE_ISCHECKED)
+ EgtZoom(ZM.ALL)
+ Else
+ m_MachiningIsChecked = False
+ ' Error loading or creating Machining Group - Error
+ MessageBox.Show(EgtMsg(10008), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
End If
- Application.Msn.NotifyColleagues(Application.MACHININGMODE_ISCHECKED)
- EgtZoom(ZM.ALL)
Else
' Deevidenzio l'ultima operazione evidenziata
Application.Msn.NotifyColleagues(Application.REMOVEMARKFROMLASTOPERATION)