diff --git a/Icarus/MainWindow/MainWindowM.vb b/Icarus/MainWindow/MainWindowM.vb index f77bae9..e272251 100644 --- a/Icarus/MainWindow/MainWindowM.vb +++ b/Icarus/MainWindow/MainWindowM.vb @@ -195,8 +195,8 @@ Public Class MainWindowM ' Verifico abilitazione nesting automatico m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey) ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(5583, 2501, 1, m_nKeyLevel) And - EgtGetKeyOptions(5583, 2501, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(5583, 2502, 1, m_nKeyLevel) And + EgtGetKeyOptions(5583, 2502, 1, m_nKeyOptions) ' Inizializzazione generale di EgtInterface m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb index 9604f91..70eac1f 100644 --- a/Icarus/My Project/AssemblyInfo.vb +++ b/Icarus/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/Icarus/SliceManager/SliceManagerVM.vb b/Icarus/SliceManager/SliceManagerVM.vb index 4d27e9c..cd60feb 100644 --- a/Icarus/SliceManager/SliceManagerVM.vb +++ b/Icarus/SliceManager/SliceManagerVM.vb @@ -376,7 +376,8 @@ Public Class SliceManagerVM ' verifico esistenza e correttezza machgroup InitMachGroup(True) ' eseguo generazione CN - bOk = ExecGenerate() + Dim sMsg As String = "" + bOk = ExecGenerate(sMsg) ' leggo stima tempo e la riporto in layer di calcolo EgtGetInfo(EgtGetFirstMachGroup(), "Ttot", m_dTime) NotifyPropertyChanged(NameOf(ghTime)) @@ -391,7 +392,13 @@ Public Class SliceManagerVM nCurrPartId = EgtGetNextPart(nCurrPartId) End While Else - MessageBox.Show("Error in NC code generation! See log file.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) + Dim sOut As String = "Error in NC code generation : " + If String.IsNullOrWhiteSpace(sMsg) Then + sOut &= "See log file." + Else + sOut &= sMsg + End If + MessageBox.Show(sOut, "Error", MessageBoxButton.OK, MessageBoxImage.Error) End If End If ' Aggiorno intestazione programma diff --git a/Icarus/Utility/LuaExec.vb b/Icarus/Utility/LuaExec.vb index 76cc0f3..59f41e2 100644 --- a/Icarus/Utility/LuaExec.vb +++ b/Icarus/Utility/LuaExec.vb @@ -64,7 +64,8 @@ Module LuaExec Return bOk End Function - Friend Function ExecGenerate() As Boolean + Friend Function ExecGenerate(ByRef sMsg As String) As Boolean + sMsg = "" EgtOutLog("-- Start ExecGenerate --") ' eseguo generazione EgtLuaCreateGlobTable("PRINT") @@ -74,7 +75,7 @@ Module LuaExec Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE) If nTabPartId <> GDB_ID.NULL Then If Not EgtGetInfo(nTabPartId, KEY_ISOFILE_PATH, sIsoFilePath) OrElse - Not IO.Directory.Exists( IO.Path.GetDirectoryName(sIsoFilePath)) Then + Not IO.Directory.Exists(IO.Path.GetDirectoryName(sIsoFilePath)) Then EgtGetCurrFilePath(sIsoFilePath) Dim sExtension As String = "" GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, "", sExtension, CurrentMachine.sMachIniFile) @@ -89,6 +90,7 @@ Module LuaExec If bOk Then Dim nErr As Integer = 999 EgtLuaGetGlobIntVar("PRINT.ERR", nErr) + EgtLuaGetGlobStringVar("PRINT.MSG", sMsg) bOk = (nErr <= 0) End If ' Cancello tavola globale