How can I select a nested family type by a parameter

How can I select a nested family type by a parameter

MiWolff
Mentor Mentor
6,328 Views
12 Replies
Message 1 of 13

How can I select a nested family type by a parameter

MiWolff
Mentor
Mentor

In a door family, I have a numerical parameter that contains a number that determines whether the door handles are standard handle bars, knobs or public building type bars or combinations of any. The number 10 would select a standard handle on the inside and exterior sides of the leaf and leave "DD" in a shared parameter that is used in our door schedules. To have this same parameter also choose the family type of the door handles, I tried to make another if(condition,this,that) formula but ran into a 'Inconsistent units' error.

How can that be fixed?

0 Likes
Accepted solutions (1)
6,329 Views
12 Replies
Replies (12)
Message 2 of 13

Ilic.Andrej
Advisor
Advisor

You re gonna have to forget about the family/type parameter. Associate the nested family parameters with the host family parameters. Then, you can play with the formulas. Those can be put in the nested family or host family (depending on your strategy). The idea is to have yes/no parameters which constrain the geometry visibility while having formulas like: 

 

code.Drücker=10

Based on what I understood while reading your post and observing the family that you created, I think it was a mistake to create code.Drücker as a number parameter. It should be integer.

 



Andrej Ilić

phonetical: ændreɪ ilich
MSc Arch

Autodesk Expert Elite Alumni

0 Likes
Message 3 of 13

FAIR59
Advisor
Advisor
Accepted solution

You can make the nested-family dependent on the code-drucker parameter.

  • In the Griffe-family, make the reference plane through the centre of the handle [Defines Origin]

RefPlane.PNG

In the door family:

  • Make the code-drucker type of parameter: Integer .
  • Make as many parameters (type of parameter : Family<Doors>) as there are choices. {  Griffe_1, Griffe_2 etc.}
  • Label the nested_TurGriff family { Griffe_Formula }
  • Make formula to choose nested family, using if- statements. (see picture)

formula.PNG 

Message 4 of 13

MiWolff
Mentor
Mentor

Brilliant this is exactly what I wanted. I'd love to click this as 'Accept as answer' but that button does not seem to be around. Just after posting this the button in question showed up - seemingly you need to be logged in first ;-).

Message 5 of 13

Anonymous
Not applicable

You are a genius! I've been trying to change family for the whole day before your post.

0 Likes
Message 6 of 13

snehil_jalanMP5D2
Community Visitor
Community Visitor

Thanks for the solution. I was facing the same issue. I need to ask further if the same thing can be possible without the parameters you made for every type and instead use a formula directly to call specific type of nested family.

P.S. I have similar family with 12 types where the names of types are similar to that in parent family.

0 Likes
Message 7 of 13

sdewittHX66A
Explorer
Explorer

sdewittHX66A_0-1698935786718.png

I have the same question as snehil.  is it possible for me to right a formula saying something similar to...
 if (DECK EXTERIOR, <family type(x)>, <family type(y)>)
the goal is to "hard code" the family type selection based on a few yes/no parameters...

0 Likes
Message 8 of 13

RSomppi
Mentor
Mentor

It's possible but gets quite complicated very quickly.

0 Likes
Message 9 of 13

sdewittHX66A
Explorer
Explorer

any examples you can share

0 Likes
Message 10 of 13

RSomppi
Mentor
Mentor

Even if I could share my families, they probably wouldn't help much. There are a number of ways to accomplish it. I got the information I needed from a couple of sources online. Alfredo Medina has a couple of good articals.

Message 11 of 13

dtiemeyer
Advisor
Advisor

Is there a way to read the value of the selected nested family and produce a result?  And if so, what is the correct syntax? For example, related to post 3 above:

If (Griffe_1<Doors> = a_Turgriffe_r172 : KB, "X", "Y")

My other CAD is a Cadillac and I like to Revit to the Max!
0 Likes
Message 12 of 13

MiWolff
Mentor
Mentor

@dtiemeyer I am afraid your approach is to Revit like comparing two text parameters. The whole value selects entities, families, text values thing is run by a number determining the outcome. Btw. the number parameter does not need to be an integer - it just looks prettier not having decimals.

0 Likes
Message 13 of 13

dtiemeyer
Advisor
Advisor

Thanks @MiWolff , that's what I was afraid of, but not surprised.

My other CAD is a Cadillac and I like to Revit to the Max!
0 Likes