EgtExecutor :

- aggiunta funzione Exe e Lua FindToolInCurrSetup.
This commit is contained in:
Dario Sassi
2020-01-10 12:15:51 +00:00
parent 29b1e48d87
commit 6aa64abf16
2 changed files with 25 additions and 0 deletions
+10
View File
@@ -1411,6 +1411,16 @@ ExeVerifyCurrSetup( STRVECTOR& vsErrors)
return pMachMgr->VerifyCurrSetup( vsErrors) ;
}
//-----------------------------------------------------------------------------
bool
ExeFindToolInCurrSetup( const string& sTool)
{
IMachMgr* pMachMgr = GetCurrMachMgr() ;
VERIFY_MACHMGR( pMachMgr, false)
// eseguo la verifica
return pMachMgr->FindToolInCurrSetup( sTool) ;
}
//-----------------------------------------------------------------------------
bool
ExeUpdateSetup( void)
+15
View File
@@ -1567,6 +1567,20 @@ LuaVerifyCurrSetup( lua_State* L)
return 2 ;
}
//-----------------------------------------------------------------------------
static int
LuaFindToolInCurrSetup( lua_State* L)
{
// 1 parametro : sTool
string sTool ;
LuaGetParam( L, 1, sTool) ;
LuaClearStack( L) ;
// verifico l'attrezzaggio della macchinata corrente
bool bOk = ExeFindToolInCurrSetup( sTool) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
//-------------------------------------------------------------------------------
// Machinings database
//-------------------------------------------------------------------------------
@@ -3708,6 +3722,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtGetDefaultSetupName", LuaGetDefaultSetupName) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtImportSetup", LuaImportSetup) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVerifyCurrSetup", LuaVerifyCurrSetup) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtFindToolInCurrSetup", LuaFindToolInCurrSetup) ;
// Machinings database
bOk = bOk && luaMgr.RegisterFunction( "EgtMdbGetMachiningNewName", LuaMdbGetMachiningNewName) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtMdbAddMachining", LuaMdbAddMachining) ;