diff --git a/EXE_Exchange.cpp b/EXE_Exchange.cpp index fd8fde1..723ff63 100644 --- a/EXE_Exchange.cpp +++ b/EXE_Exchange.cpp @@ -463,7 +463,7 @@ ExeAdvancedImport( const string& sFilePath, double dToler) //----------------------------------------------------------------------------- bool -ExeExportDxf( int nId, const string& sFilePath, int nFlag) +ExeExportDxf( int nId, const string& sFilePath, int nFlag, int nFilter) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, false) @@ -473,7 +473,7 @@ ExeExportDxf( int nId, const string& sFilePath, int nFlag) PtrOwner pExpDxf( MyCreateExportDxf()) ; bOk = bOk && ! IsNull( pExpDxf) ; // eseguo l'esportazione - pExpDxf->SetOptions( EEXFLT_DEFAULT, nFlag) ; + pExpDxf->SetOptions( nFilter, nFlag) ; bOk = bOk && pExpDxf->Export( pGeomDB, nId, sFilePath) ; // se richiesto, salvo il comando Lua equivalente if ( IsCmdLog()) { @@ -489,7 +489,7 @@ ExeExportDxf( int nId, const string& sFilePath, int nFlag) //----------------------------------------------------------------------------- bool -ExeExportStl( int nId, const string& sFilePath) +ExeExportStl( int nId, const string& sFilePath, int nFilter) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, false) @@ -499,6 +499,7 @@ ExeExportStl( int nId, const string& sFilePath) PtrOwner pExpStl( MyCreateExportStl()) ; bOk = bOk && ! IsNull( pExpStl) ; // eseguo l'esportazione + pExpStl->SetOptions( nFilter) ; bOk = bOk && pExpStl->Export( pGeomDB, nId, sFilePath) ; // se richiesto, salvo il comando Lua equivalente if ( IsCmdLog()) { @@ -513,7 +514,7 @@ ExeExportStl( int nId, const string& sFilePath) //----------------------------------------------------------------------------- bool -ExeExport3MF( int nId, const string& sFilePath) +ExeExport3MF( int nId, const string& sFilePath, int nFilter) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, false) @@ -523,6 +524,7 @@ ExeExport3MF( int nId, const string& sFilePath) PtrOwner pExp3MF( MyCreateExport3MF()) ; bOk = bOk && ! IsNull( pExp3MF) ; // eseguo l'esportazione + pExp3MF->SetOptions( nFilter) ; bOk = bOk && pExp3MF->Export( pGeomDB, nId, sFilePath) ; // se richiesto, salvo il comando Lua equivalente if ( IsCmdLog()) { diff --git a/EgtExecutor.rc b/EgtExecutor.rc index a68d88e..a456b14 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ diff --git a/LUA_Exchange.cpp b/LUA_Exchange.cpp index fc45e4f..dc44f12 100644 --- a/LUA_Exchange.cpp +++ b/LUA_Exchange.cpp @@ -190,16 +190,18 @@ LuaAdvancedImport( lua_State* L) static int LuaExportDxf( lua_State* L) { - // 2 o 3 parametri : GroupId e path del file da esportare [, Flag] + // 2, 3 o 4 parametri : GroupId e path del file da esportare [, Flag] [, Filter] int nGroupId ; LuaCheckParam( L, 1, nGroupId) string sFilePath ; LuaCheckParam( L, 2, sFilePath) int nFlag = EEXFLAG_DEFAULT ; LuaGetParam( L, 3, nFlag) ; + int nFilter = EEXFLT_DEFAULT ; + LuaGetParam( L, 4, nFilter) ; LuaClearStack( L) ; // creo il file - bool bOk = ExeExportDxf( nGroupId, sFilePath, nFlag) ; + bool bOk = ExeExportDxf( nGroupId, sFilePath, nFlag, nFilter) ; // restituisco il risultato LuaSetParam( L, bOk) ; return 1 ; @@ -209,11 +211,13 @@ LuaExportDxf( lua_State* L) static int LuaExportStl( lua_State* L) { - // 2 parametri : GroupId e path del file da esportare + // 2 parametri : GroupId e path del file da esportare [, Filter] int nGroupId ; LuaCheckParam( L, 1, nGroupId) string sFilePath ; LuaCheckParam( L, 2, sFilePath) + int nFilter = EEXFLT_DEFAULT ; + LuaGetParam( L, 3, nFilter) ; LuaClearStack( L) ; // creo il file bool bOk = ExeExportStl( nGroupId, sFilePath) ; @@ -226,11 +230,13 @@ LuaExportStl( lua_State* L) static int LuaExport3MF( lua_State* L) { - // 2 parametri : GroupId e path del file da esportare + // 2 o 3 parametri : GroupId e path del file da esportare [, Filter] int nGroupId ; LuaCheckParam( L, 1, nGroupId) string sFilePath ; LuaCheckParam( L, 2, sFilePath) + int nFilter = EEXFLT_DEFAULT ; + LuaGetParam( L, 3, nFilter) ; LuaClearStack( L) ; // creo il file bool bOk = ExeExport3MF( nGroupId, sFilePath) ;