formula round(L*0.08) for family paramter not accepted

formula round(L*0.08) for family paramter not accepted

heichan88
Collaborator Collaborator
1,416 Views
4 Replies
Message 1 of 5

formula round(L*0.08) for family paramter not accepted

heichan88
Collaborator
Collaborator

Hello,

I input a formula =

round(L*0.08)

for a value round down but responded as "unit not identical"

Please advice 

Thanks

0 Likes
Accepted solutions (1)
1,417 Views
4 Replies
Replies (4)
Message 2 of 5

RDAOU
Mentor
Mentor

Check the type is the parameter you are adding the formula to and the type of the parameter L? Are they length or number?

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


0 Likes
Message 3 of 5

heichan88
Collaborator
Collaborator

this L is itentical to other normal parameters (length, type...)

and once I add "round"  to other parameters, same message appear so that means the script is the problem

see enclosed

0 Likes
Message 4 of 5

RDAOU
Mentor
Mentor
Accepted solution

@heichan88 

 

Sorry I am receiving and replying to posts via email so I cannot see attachments

 

To round up length you need to 

1. first neutralize it (make it unitless) >>

2. round it up or down >>

3. then reapply the units ...

 

Use the formula below (replace mm for inch or feet or whichever units you use/need)

 

round((L * 0.08) / 1 mm) * 1 mm

 

You can replace round with roundup or rounddown whichever is convenient 

 

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


0 Likes
Message 5 of 5

heichan88
Collaborator
Collaborator

it is done

Thanks RDAOU

0 Likes