EgtExecutor 1.8b2 :

- aggiunta funzione Exe e Lua GetDefaultSetupName ;
This commit is contained in:
Dario Sassi
2017-02-06 10:16:20 +00:00
parent 0706264669
commit 821085c04d
3 changed files with 28 additions and 1 deletions
+11 -1
View File
@@ -1242,11 +1242,21 @@ int
ExeGetCurrSetup( void)
{
IMachMgr* pMachMgr = GetCurrMachMgr() ;
VERIFY_MACHMGR( pMachMgr, 0)
VERIFY_MACHMGR( pMachMgr, GDB_ID_NULL)
// recupero l'identificativo del gruppo di attrezzaggio della macchinata corrente
return pMachMgr->GetCurrSetup() ;
}
//-----------------------------------------------------------------------------
bool
ExeGetDefaultSetupName( string& sName)
{
IMachMgr* pMachMgr = GetCurrMachMgr() ;
VERIFY_MACHMGR( pMachMgr, false)
// recupero il nome dell'attrezzaggio di default
return pMachMgr->GetDefaultSetupName( sName) ;
}
//-----------------------------------------------------------------------------
bool
ExeImportSetup( const string& sName)
BIN
View File
Binary file not shown.
+17
View File
@@ -1335,6 +1335,22 @@ LuaTdbSave( lua_State* L)
//-----------------------------------------------------------------------------
// Setup
//-----------------------------------------------------------------------------
static int
LuaGetDefaultSetupName( lua_State* L)
{
// nessun parametro
LuaClearStack( L) ;
// recupero il nome dell'attrezzaggio di default
string sName ;
bool bOk = ExeGetDefaultSetupName( sName) ;
if ( bOk)
LuaSetParam( L, sName) ;
else
LuaSetParam( L) ;
return 1 ;
}
//-----------------------------------------------------------------------------
static int
LuaImportSetup( lua_State* L)
@@ -3063,6 +3079,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtTdbReload", LuaTdbReload) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtTdbSave", LuaTdbSave) ;
// Setup
bOk = bOk && luaMgr.RegisterFunction( "EgtGetDefaultSetupName", LuaGetDefaultSetupName) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtImportSetup", LuaImportSetup) ;
// Machinings database
bOk = bOk && luaMgr.RegisterFunction( "EgtMdbGetMachiningNewName", LuaMdbGetMachiningNewName) ;