Rais Patel wrote: Hi, in MathCad i have defined variable as wllston = 17.32 lbf when i read its value in API i am getting this value : "77.0462622041584" is there any way so i will have same value as in MathCad. Set oResult = msheet.GetValue("wllston") output : value "77.0462622041584" required output : 17.32 |
The number you get is what your force would be in Newton. Its what you also get in Mathcad if you evaluate wllston/UnitsOf(wllston).
So Mathcad seems to store the value in standard force unit and remembers that the dimension is force.
With GetValue you obviously get only the value, not the unit.
So you have two ways out:
1) divide the value you get with GetValue by 4.4482216... Thats one pound force in Newton
or
2) define a new variable in Mathcad which holds the value 17.32... without unit and use GetValue on this variable. You achieve this by dividing your variable by lbf
