EgtMachKernel 1.6s2 :
- aggiunta funzione TdbGetToolFromUUID per avere nome utensile da UUID - aggiunta funzione GetTable per avere nome tavola corrente.
This commit is contained in:
@@ -90,6 +90,27 @@ MachMgr::TdbGetNextTool( int nFamily, string& sName, int& nType) const
|
||||
return pTsMgr->GetNextTool( nFamily, sName, nType) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::TdbGetToolFromUUID( const string& sTuuid, string& sName) const
|
||||
{
|
||||
// pulisco il parametro di ritorno
|
||||
sName.clear() ;
|
||||
// recupero il gestore di utensili della macchina corrente
|
||||
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
|
||||
if ( pTsMgr == nullptr)
|
||||
return false ;
|
||||
// cerco l'utensile con l'UUID, se trovato ne restituisco il nome
|
||||
EgtUUID Tuuid ;
|
||||
if ( ! FromString( sTuuid, Tuuid))
|
||||
return false ;
|
||||
const ToolData* pTdata = pTsMgr->GetTool( Tuuid) ;
|
||||
if ( pTdata == nullptr)
|
||||
return false ;
|
||||
sName = pTdata->m_sName ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::TdbSetCurrTool( const string& sName)
|
||||
|
||||
Reference in New Issue
Block a user