Page 1 of 1

Parameter to text too much digits

Posted: Wed Apr 03, 2019 9:36 am
by DamianCz
Dear Community help!

I have a problem with parameter to text. I see too much digits after the decimal point. Is there a simple solution to round it?

Regards

Re: Parameter to text too much digits

Posted: Wed Apr 03, 2019 11:48 am
by RaudMees
Just use ROUND function. Sometimes I need extra row to round right parameter.

Let a parameter be a = 125.36 cm with the cm as current unit in TopSolid.

round2(a,1mm) =125.4cm

round2(a,1dm) = 13dm

The step for the rounding off can be modify. So we get:

round2(a,10cm) = 130cm

floor2(a,10cm) = 120cm

Example2 :

You can also not specify the reference unit. In that case, the current unit in TopSolid s used.

Let a parameter be a = 125.36 mm with the mm as current unit.

round2(a,1) =125mm

round2(a,2) = 126mm

Example3 :

The reference unit can be specify to set the number of decimal places for rounding.

Let a parameter be a = 125.361 mm with the mm as current unit.

round2(a,0.1mm) =125.4mm

round2(a,0.01mm) = 126.36mm

Re: Parameter to text too much digits

Posted: Mon Apr 08, 2019 1:00 pm
by DamianCz
Thank you! it worked :)

1. I've created new parameter called W and H
2. I've inserted driver block parameters in and round it
3. I've changed the parameters in the characteristics
4. Vioula!

Cheers