Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Division doesn't work in parameter

19 ANTWORTEN 19
GELÖST
Antworten
Nachricht 1 von 20
Anonymous
4485 Aufrufe, 19 Antworten

Division doesn't work in parameter

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

19 ANTWORTEN 19
Nachricht 2 von 20
ToanDN
als Antwort auf: Anonymous

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

Nachricht 3 von 20
barthbradley
als Antwort auf: Anonymous

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

Nachricht 4 von 20
Anonymous
als Antwort auf: ToanDN

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

Nachricht 5 von 20
ToanDN
als Antwort auf: Anonymous

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

Nachricht 6 von 20
barthbradley
als Antwort auf: Anonymous

change it to a length parameter.

Nachricht 7 von 20
Anonymous
als Antwort auf: barthbradley

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

Nachricht 8 von 20
Anonymous
als Antwort auf: Anonymous

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.

Nachricht 9 von 20
ToanDN
als Antwort auf: Anonymous

Looking at you screenshots I assume you want to get a ratio between 2 lengths, or between 2 areas. Is it correct?
Nachricht 10 von 20
Anonymous
als Antwort auf: ToanDN

Absolutely, 

Nachricht 11 von 20
Anonymous
als Antwort auf: Anonymous

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).

Nachricht 12 von 20
Anonymous
als Antwort auf: Anonymous

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.

Nachricht 13 von 20
ToanDN
als Antwort auf: Anonymous

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.
Nachricht 14 von 20
Anonymous
als Antwort auf: ToanDN

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

Nachricht 15 von 20
ToanDN
als Antwort auf: Anonymous

Edit the label format and change to Fixed  Percentage.

Nachricht 16 von 20
Anonymous
als Antwort auf: ToanDN

How should I do that?

Nachricht 17 von 20
ToanDN
als Antwort auf: Anonymous

Capture1.PNGCapture.PNG

Nachricht 18 von 20
Anonymous
als Antwort auf: ToanDN

This is Awesome , thanks

Nachricht 19 von 20
ToanDN
als Antwort auf: Anonymous

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...).

Nachricht 20 von 20
GHASEM_ARIYANI
als Antwort auf: Anonymous

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

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

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report