C. Andrew Dunning Posted October 2 Share Posted October 2 Good morning! Given the following equation, what is the syntax to control the displayed precision? Everything I have tried either a) has no effect or b) displays additional text instead of performing a mathematical function. I have gone back-and-forth through old posts, here, to no avail. (#BrxHoist#.#WeightWithChain#+#BrxHoist#.#RoofForceNoDeadloadWeight#)*0.002205 TIA... Quote Link to comment
Mark Aceto Posted October 2 Share Posted October 2 #prec_0# for a whole number #prec_1# would be decimal precision of .1 what's the conversion for at the end? i'm still on 2024 but this is what mine looks like: note: the reason it says "formated" in the field label is because that's an old data tag before data tag units were enhanced in 2024, so you actually got me to update that field with the new and improved way! now i need to update the rest of the fields like X and Y coordinates... on that note, there are more enhancements in 2025 to both units and data tags... Quote Link to comment
C. Andrew Dunning Posted October 2 Author Share Posted October 2 Thanks. I tried and adding the "prec" portion did not work after the math. The conversion is for grams > pounds. Quote Link to comment
Mark Aceto Posted October 2 Share Posted October 2 screenshot of the define field tag dialog? Quote Link to comment
Wesley Burrows Posted October 2 Share Posted October 2 (edited) 3 hours ago, C. Andrew Dunning said: Good morning! Given the following equation, what is the syntax to control the displayed precision? Everything I have tried either a) has no effect or b) displays additional text instead of performing a mathematical function. I have gone back-and-forth through old posts, here, to no avail. (#BrxHoist#.#WeightWithChain#+#BrxHoist#.#RoofForceNoDeadloadWeight#)*0.002205 TIA... I believe this will do what you're after: (#BrxHoist#.#WeightWithChain##prec_0#+#BrxHoist#.#RoofForceNoDeadloadWeight##prec_0#)*0.002205 You just need to update the prec_0 both places to however many decimals you want. Turns out you have to apply it to both variables. Edited October 2 by Wesley Burrows clariffication 1 Quote Link to comment
C. Andrew Dunning Posted October 2 Author Share Posted October 2 4 hours ago, Wesley Burrows said: You just need to update the prec_0 both places to however many decimals you want. Turns out you have to apply it to both variables. Thank you! The syntax seems odd but your solution does work! 1 Quote Link to comment
Joe Golden ENT Posted October 9 Share Posted October 9 I am trying to use this formula in a worksheet and it doesn't like it. Does anyone have a solution? Quote Link to comment
Pat Stanford Posted October 10 Share Posted October 10 Worksheets don't have the Precision functions that Data Tags do. You probably need a formula similar to: =Round(A1*100,0)/100 This should give you 2 decimal places. Use 10 for 1 decimal place, Use 1000 for 3 decimal places. You might want to use Truncate instead of Round to just drops everything after the decimal point. Or one of these functions might do what you want: ceiling(number, [significance]) Rounds a number rounded up, away from zero, to the nearest multiple of significance. =ceiling(123.123, 0.01) returns 123.13 (123.123 rounded up to the nearest multiple of 0.01) floorNum(number, [significance]) Rounds a number down, toward zero, to the nearest multiple of significance. =floorNum(123.123, 0.01) returns 123.12 (123.123 rounded down to the nearest multiple of 0.01) truncate(number, [num digits]) A number truncated to the specified number of decimal places. =truncate(123.123, 2) returns 123.12 rounddown(number, digits) Rounds the specified number down to a specified number of decimal digits. =rounddown(2.345, 2) returns 2.34 roundup(number, digits) Rounds the specified number up to a specified number of decimal digits. =roundup(2.345, 2) returns 2.35 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.