Jump to content

Data Tag Number Precision


Recommended Posts

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...

 

Link to comment

#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:

 

Screenshot2024-10-02at8_43_42AM.thumb.png.d277bb66071f9ff12168b27c7ee33edd.pngScreenshot 2024-10-02 at 8.50.40 AM.png

 

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... 

Link to comment
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 by Wesley Burrows
clariffication
  • Like 1
Link to comment

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

 

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...