diff --git a/EExExportConst.h b/EExExportConst.h index f7f10e4..e0fa1f8 100644 --- a/EExExportConst.h +++ b/EExExportConst.h @@ -1,13 +1,13 @@ //---------------------------------------------------------------------------- -// EgalTech 2014-2014 +// EgalTech 2014-2020 //---------------------------------------------------------------------------- -// File : EExExportConst.h Data : 07.08.14 Versione : 1.5h2 +// File : EExExportConst.h Data : 12.10.20 Versione : 2.2j3 // Contenuto : Costanti per esportazione. // // // // Modifiche : 07.08.14 DS Creazione modulo. -// +// 12.10.20 DS aggiunto EEXFLAG_ADV_NAMES e EEXFLAG_DEFAULT. // //---------------------------------------------------------------------------- @@ -23,4 +23,6 @@ const int EEXFLT_DEFAULT = EEXFLT_LEVUSER | EEXFLT_MODESTD | EEXFLT_STAON | EEXF //----------------------------------------------------------------------------- enum EExFlag { EEXFLAG_NONE = 0x0000, EEXFLAG_COMP_LAYER = 0x0001, - EEXFLAG_COL_BY_LAYER = 0x0002} ; + EEXFLAG_COL_BY_LAYER = 0x0002, + EEXFLAG_ADV_NAMES = 0x0004} ; +const int EEXFLAG_DEFAULT = EEXFLAG_COMP_LAYER ; diff --git a/EGnStringUtils.h b/EGnStringUtils.h index 8e815a1..bdb58f6 100644 --- a/EGnStringUtils.h +++ b/EGnStringUtils.h @@ -99,19 +99,25 @@ ValidateFileName( std::string& sName) //---------------------------------------------------------------------------- inline bool -IsValidDxfName( const std::string& sName) +IsValidDxfName( const std::string& sName, bool bAdvanced) { if ( &sName == nullptr || sName.empty()) return false ; - return ( sName.find_first_of( " <>/\\\".:;?*|='", 0) == std::string::npos) ; + std::string sOut = "<>/\\\":;?*|='" ; + if ( ! bAdvanced) + sOut += " ." ; + return ( sName.find_first_of( sOut, 0) == std::string::npos) ; } //---------------------------------------------------------------------------- inline bool -ValidateDxfName( std::string& sName) +ValidateDxfName( std::string& sName, bool bAdvanced) { + std::string sOut = "<>/\\\":;?*|='" ; + if ( ! bAdvanced) + sOut += " ." ; std::string::size_type i ; - while ( ( i = sName.find_first_of( " <>/\\\".:;?*|='")) != std::string::npos) + while ( ( i = sName.find_first_of( sOut)) != std::string::npos) sName[i] = '_' ; return true ; } diff --git a/EInAPI.h b/EInAPI.h index 4bf01c8..7af8c10 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -107,7 +107,7 @@ EIN_EXPORT BOOL __stdcall EgtImportPnt( const wchar_t* wsFilePath, int nFlag) ; EIN_EXPORT BOOL __stdcall EgtImportStl( const wchar_t* wsFilePath, double dScaleFactor) ; EIN_EXPORT BOOL __stdcall EgtAdvancedImportIsEnabled( void) ; EIN_EXPORT BOOL __stdcall EgtAdvancedImport( const wchar_t* wsFilePath) ; -EIN_EXPORT BOOL __stdcall EgtExportDxf( int nId, const wchar_t* wsFilePath) ; +EIN_EXPORT BOOL __stdcall EgtExportDxf( int nId, const wchar_t* wsFilePath, int nFlag) ; EIN_EXPORT BOOL __stdcall EgtExportStl( int nId, const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtExportSvg( int nId, const wchar_t* wsFilePath) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 07a2250..e28c289 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -113,7 +113,7 @@ EXE_EXPORT bool ExeImportPnt( const std::string& sFilePath, int nFlag) ; EXE_EXPORT bool ExeImportStl( const std::string& sFilePath, double dScaleFactor) ; EXE_EXPORT bool ExeAdvancedImportIsEnabled( void) ; EXE_EXPORT bool ExeAdvancedImport( const std::string& sFilePath) ; -EXE_EXPORT bool ExeExportDxf( int nId, const std::string& sFilePath) ; +EXE_EXPORT bool ExeExportDxf( int nId, const std::string& sFilePath, int nFlag = 1) ; EXE_EXPORT bool ExeExportStl( int nId, const std::string& sFilePath) ; EXE_EXPORT bool ExeExportSvg( int nId, const std::string& sFilePath, int nFilter = 393) ;