I will work on converting it into something that you can read...
Here it fresh out of Mach3 :
if(parm == "ZMachine" )return MainPlanner->MachPositions[2];
else
if(parm == "XMachine" )return MainPlanner->MachPositions[0];
else
if(parm == "YMachine" )return MainPlanner->MachPositions[1];
else
if(parm == "Encoder1" )return MainPlanner->MPG.Positions[0];
else
if(parm == "Encoder2" )return MainPlanner->MPG.Positions[1];
else
if(parm == "Encoder3" )return MainPlanner->MPG.Positions[2];
else
if(parm == "Encoder4" )return MainPlanner->MPG.Positions[3];
else
if(parm == "MPG1" )return MainPlanner->MPG.Positions[4];
else
if(parm == "MPG2" )return MainPlanner->MPG.Positions[5];
else
if(parm == "MPG3" )return MainPlanner->MPG.Positions[6];
else
if(parm == "XScale" )return _setup.xscale;
else
if(parm == "YScale" )return _setup.yscale;
else
if(parm == "ZScale" )return _setup.zscale;
else
if(parm == "AScale" )return _setup.ascale;
else
if(parm == "BScale" )return _setup.bscale;
else
if(parm == "CScale" )return _setup.cscale;
else
if(parm == "FeedRate" )return MainPlanner->FeedRate;
else
if(parm == "Units" )return MainPlanner->Units;
else
if(parm == "StepsPerAxisX" )return MainPlanner->StepsPerAxis[ 0];
else
if(parm == "StepsPerAxisY" )return MainPlanner->StepsPerAxis[ 1];
else
if(parm == "StepsPerAxisZ" )return MainPlanner->StepsPerAxis[ 2];
else
if(parm == "StepsPerAxisA" )return MainPlanner->StepsPerAxis[ 3];
else
if(parm == "StepsPerAxisB" )return MainPlanner->StepsPerAxis[ 4];
else
if(parm == "StepsPerAxisC" )return MainPlanner->StepsPerAxis[ 5];
else
if(parm == "VelocitiesX" )return MainPlanner->Velocities[ 0];
else
if(parm == "VelocitiesY" )return MainPlanner->Velocities[ 1];
else
if(parm == "VelocitiesZ" )return MainPlanner->Velocities[ 2];
else
if(parm == "VelocitiesA" )return MainPlanner->Velocities[ 3];
else
if(parm == "VelocitiesB" )return MainPlanner->Velocities[ 4];
else
if(parm == "VelocitiesC" )return MainPlanner->Velocities[ 5];
else
if(parm == "AccelerationX" )return MainPlanner->Acceleration[ 0];
else
if(parm == "AccelerationY" )return MainPlanner->Acceleration[ 1];
else
if(parm == "AccelerationZ" )return MainPlanner->Acceleration[ 2];
else
if(parm == "AccelerationA" )return MainPlanner->Acceleration[ 3];
else
if(parm == "AccelerationB" )return MainPlanner->Acceleration[ 4];
else
if(parm == "AccelerationC" )return MainPlanner->Acceleration[ 5];
else
if(parm == "SpindleSpeed" )return MainPlanner->Spindle.SpindleSpeed;
else
if(parm == "ZInhibitOn" )return MainPlanner->g_ZInhibit;
else
if(parm == "ZInhibitDepth" )return MainPlanner->g_ZInhDepth;
else
if(parm == "SafeZ" )
return MainPlanner->m_SafeZ;
else
if(parm == "XDRO" )return MainPlanner->XPosition;
else
if(parm == "YDRO" )return MainPlanner->YPosition;
else
if(parm == "ZDRO" )return MainPlanner->ZPosition;
else
if(parm == "ADRO" )return MainPlanner->APosition;
else
if(parm == "BDRO" )return MainPlanner->BPosition;
else
if(parm == "CDRO" )return MainPlanner->CPosition;
else
if(parm == "Repeats" )return MainPlanner->Repeats;
else
if(parm == "Boundry" )return MainPlanner->m_Boundries;
else
if(parm == "XRefPer" )return MainPlanner-> RefSpeed[0];
else
if(parm == "YRefPer" )return MainPlanner-> RefSpeed[1];
else
if(parm == "ZRefPer" )return MainPlanner-> RefSpeed[2];
else
if(parm == "ARefPer" )return MainPlanner-> RefSpeed[3];
else
if(parm == "BRefPer" )return MainPlanner-> RefSpeed[4];
else
if(parm == "CRefPer" )return MainPlanner-> RefSpeed[5];