Revit Families - Parameter Formula in Different Types

Revit Families - Parameter Formula in Different Types

d.radband
Explorer Explorer
2,461 Views
3 Replies
Message 1 of 4

Revit Families - Parameter Formula in Different Types

d.radband
Explorer
Explorer

Hi there,

 

I'm trying to figure out how to use a Min / Max Formula within different Types of the same Family. This is driven by the "LengthControl" Parameter and I use "Length" to input the desired value. This works for Families that only have one Type quite nicely and am trying to me more ambitious with how our Families are made to refine and reduce clutter within our Revit Library.

 

What I'm struggling with is how to apply this to multiple Types within the same Family where this current breaks down to my current knowledge. The Formula persists between different Types instead what I expected which was to be able to change the Formula for each Type and has thrown me into a loop. What I want to do is be able to have "Size 1 Small Jack" and "Size 1 Large Jack" (And 4 other Types using the same basis) to run off of a Min / Max formula for their own Types instead of having multiple families for just one Prop Size if at all possible.

 

Size 1 Small Jack Formula: if(Length > 1740 mm, 1740 mm, (if(Length < 1340 mm, 1340 mm, Length)))

 

Size 1 Large Jack Formula: if(Length > 2500 mm, 2500 mm, (if(Length < 1610 mm, 1610 mm, Length)))

 

Any replies are appreciated and will check back in the morning with a fresh head.

0 Likes
Accepted solutions (2)
2,462 Views
3 Replies
Replies (3)
Message 2 of 4

RPTHOMAS108
Mentor
Mentor
Accepted solution

Put the formulas into two separate type parameters (a) and (b)

Add an addition type parameter to indicate which value to take as value for Length (a) or (b).

 

That is probably the most straightforward way. The formulas have to span all types but which value from those to use in other parameters can be based on a subsequent formula if(J = 0, a, b).

 

or if you know the formula changes in length steps if(J < 1000, a, b). I believe there is no 'less than or equal to' operator which is a bit annoying because it forces the use of OR.

Message 3 of 4

ToanDN
Consultant
Consultant
Accepted solution

@d.radband wrote:

Hi there,

 

I'm trying to figure out how to use a Min / Max Formula within different Types of the same Family. This is driven by the "LengthControl" Parameter and I use "Length" to input the desired value. This works for Families that only have one Type quite nicely and am trying to me more ambitious with how our Families are made to refine and reduce clutter within our Revit Library.

 

What I'm struggling with is how to apply this to multiple Types within the same Family where this current breaks down to my current knowledge. The Formula persists between different Types instead what I expected which was to be able to change the Formula for each Type and has thrown me into a loop. What I want to do is be able to have "Size 1 Small Jack" and "Size 1 Large Jack" (And 4 other Types using the same basis) to run off of a Min / Max formula for their own Types instead of having multiple families for just one Prop Size if at all possible.

 

Size 1 Small Jack Formula: if(Length > 1740 mm, 1740 mm, (if(Length < 1340 mm, 1340 mm, Length)))

 

Size 1 Large Jack Formula: if(Length > 2500 mm, 2500 mm, (if(Length < 1610 mm, 1610 mm, Length)))

 

Any replies are appreciated and will check back in the morning with a fresh head.


- Create a type parameter for the minimum dimension and a type parameter for the maximum dimension.

- Change the value for the two parameters per type (i.e. Size 1 Small Jack type: Max length = 1740 mm, Min Length = 1340; Size 1 large Jack type: Max Length = 2500 mm, Min Length = 1610 mm)

- Then use these parameters in your formula instead of hard values:  if(Length > Max Length, Max length, (if(Length < Min Length, Min Length, Length)))

Message 4 of 4

d.radband
Explorer
Explorer

That's brilliant, exactly how I wanted it to act. Thank you both!

0 Likes