517a36a009
- aggiornamento a VS2013 - alle curve si assegna in automatico estrusione come Z di griglia - aggiunta gestione direttorio per librerie Lua - aggiunta gestione frame di griglia (CPlane) in GeomDB - aggiunta gestione visualizzazione riferimento globale - aggiunto comando Lua EgtOffsetCurve - aggiunti comandi Lua EgtExecTsc, EgtOutLog, EgtEraseFile, EgtEmptyDirectory, EgtTextFileCompare, EgtBinaryFileCompare, EgtGetVersion - aggiunti comandi Lua EgtSetGridFrame, EgtGetGridFrame, EgtGetGridVersZ.
51 lines
1.6 KiB
C++
51 lines
1.6 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2014-2014
|
|
//----------------------------------------------------------------------------
|
|
// File : API_LUA.cpp Data : 28.09.14 Versione : 1.5i5
|
|
// Contenuto : Funzioni esecuzione LUA per API.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 28.09.14 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
//--------------------------- Include ----------------------------------------
|
|
#include "stdafx.h"
|
|
#include "API.h"
|
|
#include "LUA.h"
|
|
#include "/EgtDev/Include/EInAPI.h"
|
|
#include "/EgtDev/Include/EGnStringConverter.h"
|
|
|
|
using namespace std ;
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtLuaExecLine( const wchar_t* wsLine)
|
|
{
|
|
// eseguo il comando
|
|
return ( LuaExecLine( wstrztoA( wsLine)) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtLuaExecFile( const wchar_t* wsFilePath)
|
|
{
|
|
// converto nome file
|
|
string sFilePath = wstrztoA( wsFilePath) ;
|
|
// emetto info
|
|
string sInfo = "Exec File = " + sFilePath ;
|
|
LOG_INFO( GetLogger(), sInfo.c_str())
|
|
// esecuzione script
|
|
return ( LuaExecFile( sFilePath) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtLuaGetLastError( wchar_t*& wsError)
|
|
{
|
|
wsError = _wcsdup( stringtoW( LuaGetLastError())) ;
|
|
return (( wsError == nullptr) ? FALSE : TRUE) ;
|
|
} |