Division doesn't work in parameter

Division doesn't work in parameter

Anonymous
Not applicable
5,368 Views
19 Replies
Message 1 of 20

Division doesn't work in parameter

Anonymous
Not applicable

Hi, I want to add formula to coverage parameter which calculates as foot print area/lot area. But I get inconsistent Units. I know that coverage is text parameter and foot print area/lot area are area parameters, but I can't find any solution. Thanks for helping

0 Likes
Accepted solutions (2)
5,369 Views
19 Replies
Replies (19)
Message 2 of 20

ToanDN
Consultant
Consultant

You cannot have a Text parameter as a result of math formula.  It should be a Number parameter.

0 Likes
Message 3 of 20

barthbradley
Consultant
Consultant

why is coverage a text parameter? Do you want it to return a value of "Too Much" or "Too Little" or "Just about Right"? 

Message 4 of 20

Anonymous
Not applicable

I changed it to number and this time got another error "Division By Zero", and still doesn't let me write A/B

0 Likes
Message 5 of 20

ToanDN
Consultant
Consultant

Because your B = 0 base don your screenshot.  Change it to a different value before adding the formula.

0 Likes
Message 6 of 20

barthbradley
Consultant
Consultant

change it to a length parameter.

0 Likes
Message 7 of 20

Anonymous
Not applicable

Change it to Lenght, but it says" inconsistent unit"

0 Likes
Message 8 of 20

Anonymous
Not applicable
Accepted solution

Add * 1" or / 1" to the end. I'd explain why this works, but I'm pretty sure you'll get it once you think about it.

0 Likes
Message 9 of 20

ToanDN
Consultant
Consultant
Looking at you screenshots I assume you want to get a ratio between 2 lengths, or between 2 areas. Is it correct?
0 Likes
Message 10 of 20

Anonymous
Not applicable

Absolutely, 

0 Likes
Message 11 of 20

Anonymous
Not applicable

Basically you need to ensure three things:

 

1. Your equation does not divide by zero. EVER.

2. Your equation returns a value of the type expected (a number parameter in most cases).

3. If the parameter is expecting an area, that it returns SQUARED units (may have to multiply by 1 unit in order to square). If it is just a number that it returns NO units (may have to divide by 1 unit in order to remove units). If it is a length that it returns a united value (may need to multiply by 1 unit in order to add units to value or divide by unit to make squared units into units).

0 Likes
Message 12 of 20

Anonymous
Not applicable

Inside the family, the values are all 0, but inside the project, they are fillable as you can see in attached files. You are right the division doesn't work because the values are 0, but I don't know what to do.

0 Likes
Message 13 of 20

ToanDN
Consultant
Consultant
Just enter some value for A|1 to A|14 in the family so you can finish the formula. They are place holder numbers and can change in project.
0 Likes
Message 14 of 20

Anonymous
Not applicable

Ohh, Thanks it did work, but this time the rounding is grayed out 😞 I need to have 32% 

0 Likes
Message 15 of 20

ToanDN
Consultant
Consultant

Edit the label format and change to Fixed  Percentage.

0 Likes
Message 16 of 20

Anonymous
Not applicable

How should I do that?

0 Likes
Message 17 of 20

ToanDN
Consultant
Consultant
Accepted solution

Capture1.PNGCapture.PNG

0 Likes
Message 18 of 20

Anonymous
Not applicable

This is Awesome , thanks

0 Likes
Message 19 of 20

ToanDN
Consultant
Consultant

By the way, adding /1 and *1 as suggested by @Anonymous is a good way to iron out the Inconsistent units in a formula when the parameters in the formula are not of the same Type (Length vs Area vs Volume etc...).

0 Likes
Message 20 of 20

GHASEM_ARIYANI
Advisor
Advisor

2021-05-22_8-00-00.jpg

Please use " Accept as Solution", and give kudos as appropriate to further enhance these forums. Thank you!
0 Likes