From 432fa8ac08cdbfde1292ee1c0e8d2f243290a5bf Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 30 Jan 2019 12:12:30 +0000 Subject: [PATCH] EgtExecutor : - modifiche a Exe e Lua Generate per path file CNC generato quando non assegnato. --- EXE_MachMgr.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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) ; } //-----------------------------------------------------------------------------