Parameter to text too much digits

Integrated solution for design, manufacturing and management that provides all standard parts and procedures for wood processing.

Moderators: remi77, Daniel, jacs

User avatar
DamianCz
Private First Class
Private First Class
Posts: 14
Joined: Wed May 02, 2018 1:16 pm
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.17

Parameter to text too much digits

Unread post by DamianCz » Wed Apr 03, 2019 9:36 am

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
Attachments
topsolid.png
topsolid.png (9.21 KiB) Viewed 351 times

RaudMees
Master Sergeant
Master Sergeant
Posts: 81
Joined: Wed Dec 30, 2015 11:25 am
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.17

Re: Parameter to text too much digits

Unread post by RaudMees » Wed Apr 03, 2019 11:48 am

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

User avatar
DamianCz
Private First Class
Private First Class
Posts: 14
Joined: Wed May 02, 2018 1:16 pm
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.17

Re: Parameter to text too much digits

Unread post by DamianCz » Mon Apr 08, 2019 1:00 pm

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
Attachments
topsolid2.png

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest