inches / inches = inconsistent units

inches / inches = inconsistent units

kgatzke
Collaborator Collaborator
1,359 Views
5 Replies
Message 1 of 6

inches / inches = inconsistent units

kgatzke
Collaborator
Collaborator

image.png

I want to enter a height value from standard pitch notation like 1/4" for roofs, etc. and get back an angle value to slope part of a family.  I get the right angle if I put in 'atan(12/.5)' but everything I try to do to replace .5 with a parameter based on pitch results in some kind of units error.

0 Likes
1,360 Views
5 Replies
Replies (5)
Message 2 of 6

kgatzke
Collaborator
Collaborator

Nevermind, I see what I did wrong.  "Angle" was created as length.

0 Likes
Message 3 of 6

kgatzke
Collaborator
Collaborator

Nope, still getting an error.  It calculated the angle correctly and then give me this...

image.png

0 Likes
Message 4 of 6

rodrigo.bezerra
Advisor
Advisor

Since Revit works with distinct kind of parameters (such as angles, integers, area, length), the outcome of an formula must be exactly what a parameter expects to be.
Ex. 1 meter x 1 meter = 1 sq meter. So, if the result of my formula is an area, my parameter must be an area parameter.

"But I want the value, not the meaning of it". Well, then you have to add to your formula a math way to solve it. Ex: (1 meter x 1 meter)/1 meter = 1

This is my guide for formula issues.

Rodrigo Bezerra

EESignature

0 Likes
Message 5 of 6

barthbradley
Consultant
Consultant

You have another FAMILY TYPE that is erroring out. Not the one showing in your screenshot. 

 

1/2" tapered - 2" thick

0 Likes
Message 6 of 6

kgatzke
Collaborator
Collaborator

@barthbradley wrote:

You have another FAMILY TYPE that is erroring out. Not the one showing in your screenshot. 

 

1/2" tapered - 2" thick


Which was probably set to 0 by default resulting in a divide by zero.   Problem was solved however by modifying a similar where everything worked.  No angles were used in that one.  The pitch was created by the difference between two reference planes and a boring ratio formula, all units in length.  Thanks.

0 Likes