Stair family with multiple variations formula

Stair family with multiple variations formula

J450NP13
Advisor Advisor
2,492 Views
27 Replies
Message 1 of 28

Stair family with multiple variations formula

J450NP13
Advisor
Advisor

I am modeling a set of stairs with steps going up to a porch at first floor height.  I want to make the porches height parametric and the steps to change with the height of the porch.

 

Everything is working....but I cannot figure out how to use the formula to make the first two steps visibility on or off when the porch is lower and only needs one step.

0 Likes
Accepted solutions (1)
2,493 Views
27 Replies
Replies (27)
Message 2 of 28

L.Maas
Mentor
Mentor

If you can post what you have up to now we can have a look what is possible.

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes
Message 3 of 28

J450NP13
Advisor
Advisor

Here is the family.  This is only a test for workflow purposes.

0 Likes
Message 4 of 28

L.Maas
Mentor
Mentor

Just a possible solution

 

Stairs.png

 

If you need to build in possibility of (many) more steps I probably would start to look at a nested whereby you control the stairs section in the nested component.

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes
Message 5 of 28

J450NP13
Advisor
Advisor

I can't seem to understand your logic behind the code you're writing.    I am pretty quick when it comes to understanding programming...but I'm not getting it.

0 Likes
Message 6 of 28

L.Maas
Mentor
Mentor

Basically what I am doing is the following:

-Determine the amount of steps needed. Below or equal to 0' 6" 0 steps, Higher than 0' 6" 1 step, Higher than 1' 1" 2 steps, Higher than 1' 8" 3 steps

-When the foundation height gets below 1' 8" I hide step 1 and lower step 2 from 1' 2" to 0' 7" and step 3 from 1' 7" to 1' 2".

-When the foundation height gets below 1' 1" I hide step 1 and step 2 and lower step 3 to 0' 7".

 

See attached example

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes
Message 7 of 28

J450NP13
Advisor
Advisor

Ok, I understand that.

 

What is the "Steps Needed" Parameter?

0 Likes
Message 8 of 28

L.Maas
Mentor
Mentor

I use that as an intermediary step to calculate if I need 1, 2 or 3 steps, based on the foundation height.

You could incorpotate this calculation in the the Visble_Step1, Visble_Step2 and Visble_Step3 formulas

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes
Message 9 of 28

J450NP13
Advisor
Advisor

I understand now.

 

 

Isn't there a way I can just create a formula that if I select that specific family in the name box that it just automatically hides those steps by putting that formula in their formula boxes?  Instead of depending on the height of the foundation?

0 Likes
Message 10 of 28

J450NP13
Advisor
Advisor

What is the "Steps Needed" parameter type?  An int?  What is the parameter grouped under?

0 Likes
Message 11 of 28

L.Maas
Mentor
Mentor

You can check it easily.

Parameter.png

 

It is an integer. It is grouped under Other. You can edit it and group it under another category if you like (e.g. constraints).

 

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes
Message 12 of 28

J450NP13
Advisor
Advisor

Ok, I am getting it.  I see how Steps Needed you're declareing what it is.

 

But I am not getting the formula in the dimensions for the steps.

 

 

 

 

original2.png

0 Likes
Message 13 of 28

L.Maas
Mentor
Mentor
Accepted solution

The Step 2 Rise formula:

-If "Visble_Step1 "is visble (i.e. is true, thus has a checkmark) then the height of this step should be 0' 11" otherwise it should be 0' 7"

-Because we hide step 1, step 2 becomes th first step and should be lower

-When step 1 is visble (at 0 '7")  step 2 must be higher, thus 0'11" 

 

The Step 3 Rise formula:

-If "Visble_Step1" is visible/true then the height of this third step should be 1' 7".  (We have three steps)

 If "Visble Step 2" is visible/true but not "Visble_Step1" then third step should be 1' 2" (We have two steps)

 If not than third step should be 0' 7" (We have zero or one step) 

-The if statement stops when a true statement is observed.

-When "Visble_Step1" is visible/true then automatically step 2 is also visible/true thus step 3 must be highest at 1' 7"

-When Step 1 is not visble/false then revit goes to check next statement. If step 2 is visible (step 1 was already checked not to be visible) thus we have two steps thus Step 3 must be 1' 2" .

-When Step 1 and Step 2 are not visble then we only have step 3 left and it  shall be 0' 7" (If it is even lower than also this step will be hidden)

 

Try to experiment with the family and see what it does and how it works.

 

 

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Message 14 of 28

J450NP13
Advisor
Advisor
Thank you.

I see how the syntax is now...I really appreciate it.
0 Likes
Message 15 of 28

J450NP13
Advisor
Advisor

Louis,

 

When I do that it has an issue with constriants and then wants to delete the extrusions.

0 Likes
Message 16 of 28

L.Maas
Mentor
Mentor

A few posts back I uploaded a modified version of the stairs (Stairs_test2.rfa). Did you have a look at that one?

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes
Message 17 of 28

J450NP13
Advisor
Advisor

 

I'm in 2015

0 Likes
Message 18 of 28

L.Maas
Mentor
Mentor

Do not have 2015 available at the moment.

Upload your family with what you have got so far and I will have a look

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes
Message 19 of 28

J450NP13
Advisor
Advisor

Here is what I have.

0 Likes
Message 20 of 28

L.Maas
Mentor
Mentor

Strange. I opened your family (in Revit 2017) and added the two formulas for "Step 2 RISE" and "Step 3 RISE" as in the screenshot.

Steps.png

I get no errors.

 

What do you do to get those errors?

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes