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 6e774ab..620c507 100644 Binary files a/EgtInterface.rc and b/EgtInterface.rc differ