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