From 129a54dedcd108903f9e9e1ce4c961668113f761 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 6 Apr 2016 06:32:25 +0000 Subject: [PATCH] EgtInterface 1.6o4 : - aggiunte interfacce per EgtGetOperationName, EgtGetOperationId, EgtAddMachining, EgtCreateMachining, EgtSetMachiningGeometry. --- API_MachMgr.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ EgtInterface.rc | Bin 11726 -> 11726 bytes 2 files changed, 48 insertions(+) diff --git a/API_MachMgr.cpp b/API_MachMgr.cpp index ddb87de..4573f08 100644 --- a/API_MachMgr.cpp +++ b/API_MachMgr.cpp @@ -769,6 +769,26 @@ __stdcall EgtGetOperationPhase( int nId) return ExeGetOperationPhase( nId) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtGetOperationName( int nId, wchar_t*& wsName) +{ + if ( &wsName == nullptr) + return FALSE ; + string sName ; + if ( ! ExeGetOperationName( nId, sName)) + return FALSE ; + wsName = _wcsdup( stringtoW( sName)) ; + return (( wsName == nullptr) ? FALSE : TRUE) ; +} + +//----------------------------------------------------------------------------- +int +__stdcall EgtGetOperationId( const wchar_t* wsName) +{ + return ExeGetOperationId( wstrztoA( wsName)) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtRemoveOperation( int nId) @@ -854,6 +874,20 @@ __stdcall EgtGetPhaseDisposition( int nPhase) //----------------------------------------------------------------------------- // Machinings +//----------------------------------------------------------------------------- +int +__stdcall EgtAddMachining( const wchar_t* wsName, const wchar_t* wsMachining) +{ + return ExeAddMachining( wstrztoA( wsName), wstrztoA( wsMachining)) ; +} + +//----------------------------------------------------------------------------- +int +__stdcall EgtCreateMachining( const wchar_t* wsName, int nMchType, const wchar_t* wsTool) +{ + return ExeAddMachining( wstrztoA( wsName), nMchType, wstrztoA( wsTool)) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtSetCurrMachining( int nId) @@ -889,6 +923,20 @@ __stdcall EgtSetMachiningParamString( int nType, const wchar_t* wsVal) return ( ExeSetMachiningParam( nType, string( wstrztoA( wsVal))) ? TRUE : FALSE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtSetMachiningGeometry( int nNumId, const int nIds[], const int nSubs[]) +{ + if ( nIds == nullptr || nSubs == nullptr) + return FALSE ; + // creo elenco identificativi + SELVECTOR vIds ; + for ( int i = 0 ; i < nNumId ; ++ i) + vIds.emplace_back( nIds[i], nSubs[i]) ; + vIds.reserve( nNumId) ; + return ( ExeSetMachiningGeometry( vIds) ? TRUE : FALSE) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtPreviewMachining( BOOL bRecalc) diff --git a/EgtInterface.rc b/EgtInterface.rc index 6e774abcf43559370c8f0b318a075f353ff97c14..620c507577aa93b2d33dfee915882d0106c1b901 100644 GIT binary patch delta 113 zcmX>XeJ*;#A2vpl%@4(HGEKh5na5}{`6H+9WG^L)&3#f*jGK>e8!&^VPclv3Cs+lM i-t491#khHcFjUGNr~*ls7YjlI&*XKAP&0v=TDSp_`6%@O delta 113 zcmX>XeJ*;#A2vqg%@4(HGEKh5na5~6`6H+9WG^L)&3#f*jGK>e8!&^VPclv3Cs+lM i-t491#khHcFjUGNr~*ls7YjlI&*XKAP&0v=TDSp^FDUH*