I have a family where I need to get a hypotenuse. I have reference planes I can use to derive the lengths of sides a and b to then calculate c, but how do I get the lengths of a and b into a formula?
I can't use reporting params since the dimensions aren't to host elements. I can place dimensions between the reference planes, but can't set them to params because I need them to be able to stretch based on other dimensions.
How can I do this?
Check out "Trigonometry for Right Triangles" in this link:
Revit Formulas for "everyday" usage - Revit Forum
I'm not asking how to do the math. I'm asking how I get the numbers I need into a revit formula when I can't use reporting params. By measuring, I can know what a and b are for the Pythagorean theorem, but if I can't get the values for a and b from the geometry into a parameter, I have no way of using them in a formula.
It's a Revit question, not a math question. ![]()
If I have 4 reference planes, two vertical and two horizontal, forming a rectangle. How would I use revit params to get the diagonal dimension between the opposite corners? I figure, if I can get the width and height of that rectangle into a formula, I'm golden. But how??? ![]()
Again, other params are governing where those reference planes are, and none of those params are already the width or height of the rectangle.
Hello@TheMattatonAP ,
Would it be possible to post a picture of the family parameters and/or the plan view ?
Yeah, I'll make a simplified version so the problem is easy to see without all the unrelated junk. ![]()
@TheMattatonAP wrote:I can't get the values for a and b from the geometry into a parameter
Dimension the geometry in the View and them Label the Dimensions to "a" and "b" Parameters. Use those "a" and "b" Parameters in a Formula to calculate "Hypotenuse" or "c". Or am I misunderstanding?
Okay, here's a basic example. I have X and Y params driving the position of the inner X and Y reference planes.
The "Need This" dims show what I need to derive the hypotenuse of the that innermost rectangle. But, since I can't use reporting params on family geometry, I'm stumped as to how to get the Need This numbers into a formula.
Yep, that would work if I didn't already have other dims setting the position of the reference planes. When I add dimensions to the innermost rectangle (see my image), it overconstrains. That's why I need them to be fluid and move and just tell me what the dim is. Which is what reporting params do...but...
There is not enough information here to figure the "Y-Need This". How did do decide on the placement of the Ref. Planes to begin with? That's the information we need.
I tried to water down my example to make it easier to see the problem. The actual family would just convolute things. The reference planes are where they are based on other dimensions. There IS enough information in the geometry. I can put a dimension on them and see the numbers. There's just no mechanism that I know if in revit to capture the info to put them into a formula. I can put a reporting param on them and see the numbers I need changing on the param window. I just can't use them in a formula since they aren't on host geometry. Very frustrating to see the numbers and not be able to use them.
Add X dimension parameter for overall distances between outer reference planes and your X need to know = X - X1 - X2. Same for Y.
@TheMattatonAP wrote:The reference planes are where they are based on other dimensions.
Are those "other dimensions" driven by Parameters? Is so, then you can write a Parameter formula that calculates "Y-Need This".
You will need to create additional reference planes and helper parameters to deduce the Need_This params. Place the new ref planes from ones that you can dimension from with helper params that you'll be able to use in formulas.
@ToanDN wrote:Add X dimension parameter for overall distances between outer reference planes and your X need to know = X - X1 - X2. Same for Y.
Yep, in this watered-down example, I could easily do what you're saying. It's not NEAR as easy in the real thing. WAY more at play there that end up setting the ref planes I need to work with. But yeah, there's probably a route I can take to still do the same thing. Just not as simple as X-X1-X2.
I think the bottom line is there is no way in Revit to do what I want: Reporting Params on family elements useable in formulas. Two fluid ref planes, get the distance between them into a param to use in a formula. Any regular labeled (param) dimension placed on the ref plane controls the placement of it. Reporting params are perfect, but can't be used in formulas. So, I'm back to there being no way to do it.
I appreciate your time, guys. I've given up. ![]()
Giving up??? So, giving up is an option? C'mon man; don't give up. You can do it. ![]()
@barthbradley wrote:Giving up??? So, giving up is an option? C'mon man; don't give up. You can do it.
Ha! Not always an option, but in this case, yep! I figured out another way to get things done that ended up not requiring me solving this issue. But, I still wanted to know if someone had a clever way of doing it for future reference. ![]()
Some form of reporting params (useable in formulas) on family elements would be AWESOME.
If you have some sort of relation between X_NeedThis and Y_NeedThis then you could do this using quadratic equation. Without that relation, you wont be able to achieve that using formulas in the normal/standard families.
You will need to work with Adaptive Components where the placement points are references you can dimension to using Reporting Parameters
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
Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.