EgtExecutor 1.8c4 :

- aggiunta a Exe e Lua GetAllTablesNames.
This commit is contained in:
Dario Sassi
2017-03-09 10:53:39 +00:00
parent dfb706d40f
commit ffb55dcda2
3 changed files with 28 additions and 0 deletions
+10
View File
@@ -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)
BIN
View File
Binary file not shown.
+18
View File
@@ -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) ;