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
Parameter to text too much digits
Moderators: remi77, jacs, Daniel
- DamianCz
- Private First Class
- Posts: 15
- Joined: Wed May 02, 2018 1:16 pm
- TopSolid Module: TopSolid'Wood
- TopSolid Version: 6.17
Parameter to text too much digits
- Attachments
-
- topsolid.png (9.21 KiB) Viewed 3283 times
-
- Second Officer Cadet
- Posts: 209
- Joined: Wed Dec 30, 2015 11:25 am
- TopSolid Module: TopSolid'Wood
- TopSolid Version: 6.20
- Contact:
Re: Parameter to text too much digits
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
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
- DamianCz
- Private First Class
- Posts: 15
- Joined: Wed May 02, 2018 1:16 pm
- TopSolid Module: TopSolid'Wood
- TopSolid Version: 6.17
Re: Parameter to text too much digits
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
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