EgtExecutor 1.6s2 :
- aggiunte ExeGetTable e ExeTdbGetToolFromUUID - aggiunta a Lua EgtGetTableName.
This commit is contained in:
@@ -720,6 +720,16 @@ ExeSetTable( const string& sTable)
|
||||
return pGseCtx->m_pMachMgr->SetTable( sTable) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetTable( string& sTable)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero il nome della tavola corrente della macchinata corrente
|
||||
return pGseCtx->m_pMachMgr->GetTable( sTable) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetTableRef( int nInd, Point3d& ptPos)
|
||||
@@ -842,6 +852,16 @@ ExeTdbGetNextTool( int nFamily, string& sName, int& nType)
|
||||
return pGseCtx->m_pMachMgr->TdbGetNextTool( nFamily, sName, nType) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeTdbGetToolFromUUID( const string& sTuuid, string& sName)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// restituisce nome dell'utensile di dato UUID
|
||||
return pGseCtx->m_pMachMgr->TdbGetToolFromUUID( sTuuid, sName) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeTdbSetCurrTool( const string& sName)
|
||||
|
||||
Binary file not shown.
@@ -726,6 +726,23 @@ LuaSetTable( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetTableName( lua_State* L)
|
||||
{
|
||||
// nessun parametro
|
||||
LuaClearStack( L) ;
|
||||
// recupero il nome della tavola corrente
|
||||
string sTable ;
|
||||
bool bOk = ExeGetTable( sTable) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk)
|
||||
LuaSetParam( L, sTable) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetTableRef( lua_State* L)
|
||||
@@ -2521,6 +2538,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtRotatePartInRawPart", LuaRotatePartInRawPart) ;
|
||||
// Table & Fixtures
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetTable", LuaSetTable) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetTableName", LuaGetTableName) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetTableRef", LuaGetTableRef) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetTableArea", LuaGetTableArea) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddFixture", LuaAddFixture) ;
|
||||
|
||||
Reference in New Issue
Block a user