I’m struggling with If statements & while loops.
I understand IF and WHILE statements in other programming but in Dynamo and or Python in Dynamo I’m lost. I can make the if statements in dynamo and get the condition but then after I have the condition met I have no idea how to proceed. I need to understand to create additional walls in Revit based on the following logic. I expect WHILE should work best but it is odd in Dynamo and have found very little useful information. I understand the basics of Python and probably can sort out how to make a loop work in Python. But I get lost when trying to apply the python information results to creating the following revit walls.
I have a condition that will always be an integer between 1 to 6 a separation distance of ‘W’ for Width for spacing between the walls.
I start by having an Existing Revit Wall #1.
If the integer value =
1 then I do nothing. (Result: 1 Existing Revit Wall)
2 then build 1 Revit wall #2 W distance away Existing Revit wall #1 (Result: 2 walls)
3 then also build 1 Revit wall #3 + W distance from wall #2 (Result: 3 walls)
4 then also build 1 Revit wall #4 + W distance from wall #3 (Result: 4 walls)
5 then also build 1 Revit wall #5 + W distance away from wall #4 (Result: 5 walls)
6 then also build 1 Revit wall #6 + W distance away from wall #5 (Result: 6 walls)
Any thoughts or good samples to refer to that allows me to use IF or WHILE statements to create multiple walls depending on the INTEGER condition?