PDA

View Full Version : Formula problems



Ven
2011-05-06, 02:57 PM
I have been trying to create a window family that allows for a parametric elliptical transom. It works great to simply add a parameter to the major and minor axis of the ellipse when it is only a cut opening. However, when a sweep is added, the ellipse will break once the ratio of major to minor axis gets to small. Problem is, a straight IF/THEN formula using a ratio of x:y does not cut it. I did a bit of searching and found a formula that will (potentially) fix the problem, but I get the "inconsistent units" error message. I'm not sure why since all of the parts of the formula break down to length (x'-y").

IF((Ellipse Major Axis/Ellipse Minor Axis)<Ellipse Major Axis * (sqrt(1-(Ellipse Minor Axis/Ellipse Major Axis)^2)), Ellipse Major Axis * (sqrt(1-(Ellipse Minor Axis/Ellipse Major Axis)^2)), Ellipse Minor Axis

The units break down to:

IF((x'-y"/x'-y")<x'-y" * (sqrt(1-(x'-y"/x'-y")^2)), x'-y" * (sqrt(1-(x'-y"/x'-y")^2)), x'-y"

I don't need to know if I have the formula correct (though if you have input on that, it is welcome), but I DO need to know where my units error is coming from.

hadlari
2011-05-06, 03:21 PM
did you miss out on your closing end bracket at the very end here?

mysixstring
2011-05-06, 03:30 PM
When you divide a length by a length you cancel out the units which is why Revit is giving you and error message. You will need to add the units back in every time you do this. Your formula should look something like this.
((Ellipse Major Axis/Ellipse Minor Axis) * 1' )<Ellipse Major Axis