diff --git a/EXE_MachMgr.cpp b/EXE_MachMgr.cpp index c76d599..1f78341 100644 --- a/EXE_MachMgr.cpp +++ b/EXE_MachMgr.cpp @@ -2481,6 +2481,16 @@ ExeSimGetToolInfo( string& sName, double& dSpeed) return pMachMgr->SimGetToolInfo( sName, dSpeed) ; } +//----------------------------------------------------------------------------- +bool +ExeSimGetOperationInfo( string& sName, int& nType) +{ + IMachMgr* pMachMgr = GetCurrMachMgr() ; + VERIFY_MACHMGR( pMachMgr, false) + // recupero dati della operazione + return pMachMgr->SimGetOperationInfo( sName, nType) ; +} + //----------------------------------------------------------------------------- bool ExeSimGetMoveInfo( int& nGmove, double& dFeed) diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 883f20d..68a40f2 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ diff --git a/LUA_MachMgr.cpp b/LUA_MachMgr.cpp index 381272f..f937665 100644 --- a/LUA_MachMgr.cpp +++ b/LUA_MachMgr.cpp @@ -2623,6 +2623,28 @@ LuaSimGetToolInfo( lua_State* L) return 2 ; } +//------------------------------------------------------------------------------- +static int +LuaSimGetOperationInfo( lua_State* L) +{ + // nessun parametro + LuaClearStack( L) ; + // recupero nome e tipo dell'operazione corrente + string sName ; + int nType ; + bool bOk = ExeSimGetOperationInfo( sName, nType) ; + // restituisco il risultato + if ( bOk) { + LuaSetParam( L, sName) ; + LuaSetParam( L, nType) ; + } + else { + LuaSetParam( L) ; + LuaSetParam( L) ; + } + return 2 ; +} + //------------------------------------------------------------------------------- static int LuaSimGetMoveInfo( lua_State* L) @@ -3442,6 +3464,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr) bOk = bOk && luaMgr.RegisterFunction( "EgtSimHome", LuaSimHome) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSimGetAxisInfoPos", LuaSimGetAxisInfoPos) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSimGetToolInfo", LuaSimGetToolInfo) ; + bOk = bOk && luaMgr.RegisterFunction( "EgtSimGetOperationInfo", LuaSimGetOperationInfo) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSimGetMoveInfo", LuaSimGetMoveInfo) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSimSetStep", LuaSimSetStep) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSimStop", LuaSimStop) ;