EgtExecutor :
- a Exe/Lua ExportSvg aggiunto parametro Filter.
This commit is contained in:
+4
-2
@@ -308,7 +308,7 @@ ExeExportStl( int nId, const string& sFilePath)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeExportSvg( int nId, const string& sFilePath)
|
||||
ExeExportSvg( int nId, const string& sFilePath, int nFilter)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
@@ -318,11 +318,13 @@ ExeExportSvg( int nId, const string& sFilePath)
|
||||
PtrOwner<IExportSvg> pExpSvg( MyCreateExportSvg()) ;
|
||||
bOk = bOk && ! IsNull( pExpSvg) ;
|
||||
// eseguo l'esportazione
|
||||
pExpSvg->SetOptions( nFilter) ;
|
||||
bOk = bOk && pExpSvg->Export( pGeomDB, nId, sFilePath) ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtExportSvg(" + ToString( nId) + ",'" +
|
||||
StringToLuaString( sFilePath) + "')" +
|
||||
StringToLuaString( sFilePath) + "'," +
|
||||
ToString( nFilter) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
|
||||
+5
-2
@@ -16,6 +16,7 @@
|
||||
#include "LUA.h"
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDev/Include/EXeConst.h"
|
||||
#include "/EgtDev/Include/EExExportConst.h"
|
||||
#include "/EgtDev/Include/EGkLuaAux.h"
|
||||
#include "/EgtDev/Include/EgnStringUtils.h"
|
||||
|
||||
@@ -159,14 +160,16 @@ LuaExportStl( lua_State* L)
|
||||
static int
|
||||
LuaExportSvg( lua_State* L)
|
||||
{
|
||||
// 2 parametri, GroupId e path del file da esportare
|
||||
// 2 o 3 parametri, GroupId, Path del file da esportare [, Filter]
|
||||
int nGroupId ;
|
||||
LuaCheckParam( L, 1, nGroupId)
|
||||
string sFilePath ;
|
||||
LuaCheckParam( L, 2, sFilePath)
|
||||
int nFilter = EEXFLT_DEFAULT ;
|
||||
LuaCheckParam( L, 3, nFilter)
|
||||
LuaClearStack( L) ;
|
||||
// creo il file
|
||||
bool bOk = ExeExportSvg( nGroupId, sFilePath) ;
|
||||
bool bOk = ExeExportSvg( nGroupId, sFilePath, nFilter) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
|
||||
Reference in New Issue
Block a user