diff --git a/EXE_MachMgr.cpp b/EXE_MachMgr.cpp index 0f343df..d043cd8 100644 --- a/EXE_MachMgr.cpp +++ b/EXE_MachMgr.cpp @@ -19,9 +19,11 @@ #include "AuxTools.h" #include "DllMachKernel.h" #include "/EgtDev/Include/EXeExecutor.h" +#include "/EgtDev/Include/EXeConst.h" #include "/EgtDev/Include/EGkStringUtils3d.h" #include "/EgtDev/Include/EMkOperationConst.h" #include "/EgtDev/Include/EMkSimuGenConst.h" +#include "/EgtDev/Include/EGnFileUtils.h" #include "/EgtDev/Include/EgtStringConverter.h" #include "/EgtDev/Include/EgtPointerOwner.h" @@ -2649,8 +2651,25 @@ ExeGenerate( const string& sCncFile, const string& sInfo) { IMachMgr* pMachMgr = GetCurrMachMgr() ; VERIFY_MACHMGR( pMachMgr, false) + string sMyCncFile = sCncFile ; + // se nome file vuoto + if ( IsEmptyOrSpaces( sMyCncFile)) { + // recupero la path del progetto + string sProjPath ; + if ( ! ExeGetCurrFilePath( sProjPath)) + return false ; + // ne deduco il direttorio + string sDir = GetDirectory( sProjPath) ; + ReplaceString( sDir, "/", "\\") ; + // recupero il nome + string sNcName ; + if ( ! ExeGetInfo( ExeGetCurrMachGroup(), GDL_NC_NAME, sNcName)) + sNcName = GetFileTitleEgt( sProjPath) + ".cnc" ; + // creo la path completa + sMyCncFile = sDir + "\\" + sNcName ; + } // eseguo la generazione del part-program della macchinata corrente - return pMachMgr->Generate( sCncFile, sInfo) ; + return pMachMgr->Generate( sMyCncFile, sInfo) ; } //-----------------------------------------------------------------------------