diff --git a/EXE_MachMgr.cpp b/EXE_MachMgr.cpp index 54891b0..d37280d 100644 --- a/EXE_MachMgr.cpp +++ b/EXE_MachMgr.cpp @@ -2476,6 +2476,16 @@ ExeGetAllHeadsNames( STRVECTOR& vNames) return pMachMgr->GetAllHeadsNames( vNames) ; } +//----------------------------------------------------------------------------- +bool +ExeGetAllTablesNames( STRVECTOR& vNames) +{ + IMachMgr* pMachMgr = GetCurrMachMgr() ; + VERIFY_MACHMGR( pMachMgr, false) + // recupero l'elenco delle tavole + return pMachMgr->GetAllTablesNames( vNames) ; +} + //----------------------------------------------------------------------------- bool ExeSetAxisPos( const string& sAxis, double dVal) diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 9fb056f..eb5448d 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ diff --git a/LUA_MachMgr.cpp b/LUA_MachMgr.cpp index aecb24d..649bbbc 100644 --- a/LUA_MachMgr.cpp +++ b/LUA_MachMgr.cpp @@ -2912,6 +2912,23 @@ LuaGetAllHeadsNames( lua_State* L) return 1 ; } +//------------------------------------------------------------------------------- +static int +LuaGetAllTablesNames( lua_State* L) +{ + // nessun parametro + LuaClearStack( L) ; + // recupero l'elenco delle tavole della macchina corrente + STRVECTOR vNames ; + bool bOk = ExeGetAllTablesNames( vNames) ; + // restituisco il risultato + if ( bOk) + LuaSetParam( L, vNames) ; + else + LuaSetParam( L) ; + return 1 ; +} + //------------------------------------------------------------------------------- static int LuaSetAxisPos( lua_State* L) @@ -3220,6 +3237,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr) bOk = bOk && luaMgr.RegisterFunction( "EgtGetHeadId", LuaGetHeadId) ; bOk = bOk && luaMgr.RegisterFunction( "EgtGetAxisToken", LuaGetAxisToken) ; bOk = bOk && luaMgr.RegisterFunction( "EgtGetAllHeadsNames", LuaGetAllHeadsNames) ; + bOk = bOk && luaMgr.RegisterFunction( "EgtGetAllTablesNames", LuaGetAllTablesNames) ; // Machine Calc bOk = bOk && luaMgr.RegisterFunction( "EgtSetCalcTable", LuaSetCalcTable) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSetCalcTool", LuaSetCalcTool) ;