From d31c72f4f5a98a9f4a8e07d36d8f6ca770cdc704 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 31 Jan 2025 09:00:50 +0100 Subject: [PATCH] EgtExecutor 2.7a4 : - aggiunta funzione Exe/Lua SetFixtureLink. --- EXE_MachMgr.cpp | 42 +++++++++++++++++++++++++++++++----------- EgtExecutor.rc | Bin 18890 -> 18890 bytes LUA_MachMgr.cpp | 18 ++++++++++++++++++ 3 files changed, 49 insertions(+), 11 deletions(-) diff --git a/EXE_MachMgr.cpp b/EXE_MachMgr.cpp index 584fdf6..d63d7f0 100644 --- a/EXE_MachMgr.cpp +++ b/EXE_MachMgr.cpp @@ -1032,8 +1032,8 @@ ExeMoveDispAxis( const string& sName, double dPos) ExeSetModified() ; // se richiesto, salvo il comando Lua equivalente if ( IsCmdLog()) { - string sLua = "EgtMoveDispAxis(" + sName + "," + - ToString( dPos) + ")" + + string sLua = "EgtMoveDispAxis('" + StringToLuaString( sName) + "'," + + ToString( dPos) + ")" + " -- Ok=" + ToString( bOk) ; LOG_INFO( GetCmdLogger(), sLua.c_str()) ; } @@ -1052,7 +1052,7 @@ ExeRemoveDispAxis( const string& sName) ExeSetModified() ; // se richiesto, salvo il comando Lua equivalente if ( IsCmdLog()) { - string sLua = "EgtRemoveDispAxis(" + sName + ")" + + string sLua = "EgtRemoveDispAxis('" + StringToLuaString( sName) + "')" + " -- Ok=" + ToString( bOk) ; LOG_INFO( GetCmdLogger(), sLua.c_str()) ; } @@ -1090,10 +1090,10 @@ ExeAddFixture( const string& sName, const Point3d& ptPos, double dAngRotDeg, dou ExeSetModified() ; // se richiesto, salvo il comando Lua equivalente if ( IsCmdLog()) { - string sLua = "EgtAddFixture(" + sName + ",{" + - ToString( ptPos) + "}," + - ToString( dAngRotDeg) + "," + - ToString( dMov) + ")" + + string sLua = "EgtAddFixture('" + StringToLuaString( sName) + "',{" + + ToString( ptPos) + "}," + + ToString( dAngRotDeg) + "," + + ToString( dMov) + ")" + " -- Id=" + ToString( nId) ; LOG_INFO( GetCmdLogger(), sLua.c_str()) ; } @@ -1201,8 +1201,28 @@ ExeRotateFixture( int nFxtId, double dDeltaAngDeg) ExeSetModified() ; // se richiesto, salvo il comando Lua equivalente if ( IsCmdLog()) { - string sLua = "EgtRotateFixture(" + ToString( nFxtId) + ",{" + - ToString( dDeltaAngDeg) + "})" + + string sLua = "EgtRotateFixture(" + ToString( nFxtId) + "," + + ToString( dDeltaAngDeg) + ")" + + " -- Ok=" + ToString( bOk) ; + LOG_INFO( GetCmdLogger(), sLua.c_str()) ; + } + // restituisco il risultato + return bOk ; +} + +//----------------------------------------------------------------------------- +bool +ExeSetFixtureLink( int nFxtId, const string& sTaLink) +{ + IMachMgr* pMachMgr = GetCurrMachMgr() ; + VERIFY_MACHMGR( pMachMgr, false) + // imposto il collegamento all'asse di tavola indicato + bool bOk = pMachMgr->SetFixtureLink( nFxtId, sTaLink) ; + ExeSetModified() ; + // se richiesto, salvo il comando Lua equivalente + if ( IsCmdLog()) { + string sLua = "EgtSetFixtureLink(" + ToString( nFxtId) + ",'" + + StringToLuaString( sTaLink) + "')" + " -- Ok=" + ToString( bOk) ; LOG_INFO( GetCmdLogger(), sLua.c_str()) ; } @@ -1241,8 +1261,8 @@ ExeSetFixtureMobile( int nFxtId, double dMove) ExeSetModified() ; // se richiesto, salvo il comando Lua equivalente if ( IsCmdLog()) { - string sLua = "EgtSetFixtureMobile(" + ToString( nFxtId) + ",{" + - ToString( dMove) + "})" + + string sLua = "EgtSetFixtureMobile(" + ToString( nFxtId) + "," + + ToString( dMove) + ")" + " -- Ok=" + ToString( bOk) ; LOG_INFO( GetCmdLogger(), sLua.c_str()) ; } diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 417933e31d86302b78397f0f7245b9b3bf44829f..4456be81880cfdde2a9cff086b178c86c12f2fb8 100644 GIT binary patch delta 81 zcmX>#neo(Q#tpyN7)>_+W^-i*QjT29S-`yGOp`YVRxz4PcH~Ol+$UrM5#neo(Q#tpyN7>zgoW^-i*QjT29S-`yGOp`YVRxuh+cH~Ol+$UrM5