EgtInterface 1.5i5 :
- aggiunto interprete Lua - portate in interfaccia API molte funzioni di base.
This commit is contained in:
+48
-6
@@ -30,10 +30,17 @@ using namespace std ;
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtGetFileType( const wchar_t* wsFilePath)
|
||||
{
|
||||
return EgtGetFileType( wstrztoA( wsFilePath)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtGetFileType( const string& sFilePath)
|
||||
{
|
||||
// divido in nome e direttorio
|
||||
string sFileDir, sFileName ;
|
||||
SplitLast( wstrztoA( wsFilePath), "\\", sFileDir, sFileName) ;
|
||||
SplitLast( sFilePath, "\\", sFileDir, sFileName) ;
|
||||
|
||||
// recupero l'estensione
|
||||
string sFileTitle, sFileExt ;
|
||||
@@ -61,6 +68,13 @@ __stdcall EgtGetFileType( const wchar_t* wsFilePath)
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtImportDxf( int nGseCtx, const wchar_t* wsFilePath)
|
||||
{
|
||||
return EgtImportDxf( nGseCtx, wstrztoA( wsFilePath)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtImportDxf( int nGseCtx, const string& sFilePath)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
@@ -71,12 +85,19 @@ __stdcall EgtImportDxf( int nGseCtx, const wchar_t* wsFilePath)
|
||||
PtrOwner<IImportDxf> pImpDxf( CreateImportDxf()) ;
|
||||
VERIFY_NULL( Get( pImpDxf), "Error in CreateImportDxf", FALSE)
|
||||
// eseguo l'importazione
|
||||
return ( pImpDxf->Import( wstrztoA( wsFilePath), pGeomDB, nPartId) ? TRUE : FALSE) ;
|
||||
return ( pImpDxf->Import( sFilePath, pGeomDB, nPartId) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtImportStl( int nGseCtx, const wchar_t* wsFilePath)
|
||||
{
|
||||
return EgtImportStl( nGseCtx, wstrztoA( wsFilePath)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtImportStl( int nGseCtx, const string& sFilePath)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
@@ -88,12 +109,19 @@ __stdcall EgtImportStl( int nGseCtx, const wchar_t* wsFilePath)
|
||||
PtrOwner<IImportStl> pImpStl( CreateImportStl()) ;
|
||||
VERIFY_NULL( Get( pImpStl), "Error in CreateImportStl", FALSE)
|
||||
// eseguo l'importazione
|
||||
return ( pImpStl->Import( wstrztoA( wsFilePath), pGeomDB, nLayerId) ? TRUE : FALSE) ;
|
||||
return ( pImpStl->Import( sFilePath, pGeomDB, nLayerId) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtImportCnc( int nGseCtx, const wchar_t* wsFilePath)
|
||||
{
|
||||
return EgtImportCnc( nGseCtx, wstrztoA( wsFilePath)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtImportCnc( int nGseCtx, const string& sFilePath)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
@@ -104,12 +132,19 @@ __stdcall EgtImportCnc( int nGseCtx, const wchar_t* wsFilePath)
|
||||
PtrOwner<IImportCnc> pImpCnc( CreateImportCnc()) ;
|
||||
VERIFY_NULL( Get( pImpCnc), "Error in CreateImportCnc", FALSE)
|
||||
// eseguo l'importazione
|
||||
return ( pImpCnc->Import( wstrztoA( wsFilePath), pGeomDB, nPartId) ? TRUE : FALSE) ;
|
||||
return ( pImpCnc->Import( sFilePath, pGeomDB, nPartId) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtExportDxf( int nGseCtx, int nId, const wchar_t* wsFilePath)
|
||||
{
|
||||
return EgtExportDxf( nGseCtx, nId, wstrztoA( wsFilePath)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtExportDxf( int nGseCtx, int nId, const string& sFilePath)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
@@ -118,12 +153,19 @@ __stdcall EgtExportDxf( int nGseCtx, int nId, const wchar_t* wsFilePath)
|
||||
PtrOwner<IExportDxf> pExpDxf( CreateExportDxf()) ;
|
||||
VERIFY_NULL( Get( pExpDxf), "Error in CreateExportDxf", FALSE)
|
||||
// eseguo l'esportazione
|
||||
return ( pExpDxf->Export( pGeomDB, nId, wstrztoA( wsFilePath)) ? TRUE : FALSE) ;
|
||||
return ( pExpDxf->Export( pGeomDB, nId, sFilePath) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtExportStl( int nGseCtx, int nId, const wchar_t* wsFilePath)
|
||||
{
|
||||
return EgtExportStl( nGseCtx, nId, wstrztoA( wsFilePath)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtExportStl( int nGseCtx, int nId, const string& sFilePath)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
@@ -132,5 +174,5 @@ __stdcall EgtExportStl( int nGseCtx, int nId, const wchar_t* wsFilePath)
|
||||
PtrOwner<IExportStl> pExpStl( CreateExportStl()) ;
|
||||
VERIFY_NULL( Get( pExpStl), "Error in CreateExportStl", FALSE)
|
||||
// eseguo l'esportazione
|
||||
return ( pExpStl->Export( pGeomDB, nId, wstrztoA( wsFilePath)) ? TRUE : FALSE) ;
|
||||
return ( pExpStl->Export( pGeomDB, nId, sFilePath) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user