Quantcast
Channel: PTC Community : Unanswered Discussions - Creo
Viewing all articles
Browse latest Browse all 8685

how to report a number with conditionally-determined decimal places in a drawing

$
0
0

Hello,

 

I am experiencing a problem with reporting a number parameter (in my case a parameter of mass) with specific decimal places in a drawing.:

 

- I would like to plot the parameter with 1 decimal places if the mass is higher or equal to 1 kg.

- If instead the mass is lower than 1 kg, I would like to report it with 2 decimal places

 

I tried to set a conditional script (in the relations field) with functions like  "if...ceil(),floor()" : but the problem is that in the drawing cell where I report the mass, I cannot set a conditional-formatted number of decimal places. I can set only 1 or 2, fixed:

 

1.png

 

and therefore when the mass is higher than 1 kg (for example 2,6 kg) and I set 2 decimal places in the cell property window, it reports for example 2.60 kg (with a useless zero).

(and vice-versa if I set 1 dec. place with a mass lower than 1 kg, the system cuts out a decimal place).

 

thanks


Viewing all articles
Browse latest Browse all 8685


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>