d65f563ea9
- aggiunta interfaccia per funzione EgtImportPly.
176 lines
5.8 KiB
C++
176 lines
5.8 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2014-2014
|
|
//----------------------------------------------------------------------------
|
|
// File : API_Exchange.cpp Data : 20.09.14 Versione : 1.5i4
|
|
// Contenuto : Funzioni import/export per API.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 20.09.14 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
//--------------------------- Include ----------------------------------------
|
|
#include "stdafx.h"
|
|
#include "API.h"
|
|
#include "/EgtDev/Include/EInAPI.h"
|
|
#include "/EgtDev/Include/EXeExecutor.h"
|
|
#include "/EgtDev/Include/EgtStringConverter.h"
|
|
|
|
using namespace std ;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
int
|
|
__stdcall EgtGetFileType( const wchar_t* wsFilePath)
|
|
{
|
|
return ExeGetFileType( wstrztoA( wsFilePath)) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtSetBtlAuxDir( const wchar_t* wsBtlAuxDir)
|
|
{
|
|
return ( ExeSetBtlAuxDir( wstrztoA( wsBtlAuxDir)) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtImportBtl( const wchar_t* wsFilePath, int nFlag)
|
|
{
|
|
return ( ExeImportBtl( wstrztoA( wsFilePath), nFlag) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtImportBtlx( const wchar_t* wsFilePath, int nFlag)
|
|
{
|
|
return ( ExeImportBtlx( wstrztoA( wsFilePath), nFlag) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtImportCnc( const wchar_t* wsFilePath, int nFlag)
|
|
{
|
|
return ( ExeImportCnc( wstrztoA( wsFilePath), nFlag) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtImportCsf( const wchar_t* wsFilePath)
|
|
{
|
|
return ( ExeImportCsf( wstrztoA( wsFilePath)) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtImportDxf( const wchar_t* wsFilePath, double dScaleFactor)
|
|
{
|
|
return ( ExeImportDxf( wstrztoA( wsFilePath), dScaleFactor) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtImportPnt( const wchar_t* wsFilePath, int nFlag)
|
|
{
|
|
return ( ExeImportPnt( wstrztoA( wsFilePath), nFlag) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtImportStl( const wchar_t* wsFilePath, double dScaleFactor)
|
|
{
|
|
return ( ExeImportStl( wstrztoA( wsFilePath), dScaleFactor) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtImportOff( const wchar_t* wsFilePath, double dScaleFactor)
|
|
{
|
|
return ( ExeImportOff( wstrztoA( wsFilePath), dScaleFactor) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtImportPly( const wchar_t* wsFilePath, double dScaleFactor)
|
|
{
|
|
return ( ExeImportPly( wstrztoA( wsFilePath), dScaleFactor) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtImport3MF( const wchar_t* wsFilePath, int nFlag)
|
|
{
|
|
return ( ExeImport3MF( wstrztoA( wsFilePath), nFlag) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtImport3dm( const wchar_t* wsFilePath)
|
|
{
|
|
return ( ExeImport3dm( wstrztoA( wsFilePath)) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtAdvancedImportIsEnabled( void)
|
|
{
|
|
return ( ExeAdvancedImportIsEnabled() ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtAdvancedImport( const wchar_t* wsFilePath, double dLinToler, int nFlag)
|
|
{
|
|
return ( ExeAdvancedImport( wstrztoA( wsFilePath), dLinToler, nFlag) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtExportDxf( int nId, const wchar_t* wsFilePath, int nFlag, int nFilter)
|
|
{
|
|
return ( ExeExportDxf( nId, wstrztoA( wsFilePath), nFlag, nFilter) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtExportStl( int nId, const wchar_t* wsFilePath, int nFilter)
|
|
{
|
|
return ( ExeExportStl( nId, wstrztoA( wsFilePath), nFilter) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtExport3MF( int nId, const wchar_t* wsFilePath, int nFilter)
|
|
{
|
|
return ( ExeExport3MF( nId, wstrztoA( wsFilePath), nFilter) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtExport3dm( int nId, const wchar_t* wsFilePath, int nFilter)
|
|
{
|
|
return ( ExeExport3dm( nId, wstrztoA( wsFilePath), nFilter) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtExportSvg( int nId, const wchar_t* wsFilePath, int nFilter)
|
|
{
|
|
return ( ExeExportSvg( nId, wstrztoA( wsFilePath), nFilter) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtSetThreeJSLibDir( const wchar_t* wsThreeJSLibDir)
|
|
{
|
|
return ( ExeSetThreeJSLibDir( wstrztoA( wsThreeJSLibDir)) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtExportThreeJS( int nId, const wchar_t* wsFilePath, int nFilter)
|
|
{
|
|
return ( ExeExportThreeJS( nId, wstrztoA( wsFilePath), nFilter) ? TRUE : FALSE) ;
|
|
}
|