EgtExecutor 1.8h4 :
- aggiunta a Exe e Lua SimGetOperationInfo.
This commit is contained in:
@@ -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)
|
||||
|
||||
Binary file not shown.
@@ -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) ;
|
||||
|
||||
Reference in New Issue
Block a user