The formula that I have written seems to work with the exception that if the wall length is more than 40', I need the 2nd Top Top Plate to be 20'. Basically what happens here is that if the wall is less than 40' and the wall runs past the Adjacent wall on the left, the plate is cut back whatever the distance is of the left adjacent wall. If it butts the wall instead, the plate extends whatever the dimension of the adjacent wall is. If the wall is more than 40' long, the plate is an even 20' and the formula is applied to the 3rd Top Top Plate.
Gelöst! Gehe zur Lösung
Gelöst von Ilic.Andrej. Gehe zur Lösung
Gelöst von barthbradley. Gehe zur Lösung
I'm lost. First, we need markups of those elements you mentioned ("2nd top plate", "3rd top plate", etc...) Some sketch would help us understand what it is you are speaking of. Second, I don't understand what is the question. It looks like you highlighted some formula that you already used. You don't know which formula to use?
Andrej Ilić
phonetical: ændreɪ ilich
MSc Arch
Autodesk Expert Elite Alumni
My apologies, I didn't actually ask the question. So this is fairly complex in the way that the family works IMO. In the picture that is attached, you'll notice that there are breaks in the bottom, top, and top top plates. Each plate is 20' or less. The very top plate cuts back or extends depending on if it butts another wall or another wall butts into it. You'll see on the left side of Wall A that the uppermost (Top Top Plate) is cut back, and the plate on Wall B extends over Wall A. Then Plate 1 breaks to the right at around 20', then Plate 2 runs for the rest of the wall. Plate 2 is the plate that the highlighted formula is written for that I posted. If the conditions aren't met in that formula, the plate needs to be 20' long. Keep in mind that the wall changes in length so the plates disappear after the wall shrinks past the point where there is a break in the plate. Imagine a break in the 2nd plate at 40' (which would be just above the window) when the wall gets to less than 40' in length, that plate begins to flex with the wall. When the wall reaches it's final length, the Top Top Plate also extends and cuts back as it does on the corners at Wall A and Wall B. I have a Yes/No parameter set up to tell the plate whether or not to cut back or extend.
So in short, (and here is the question that I meant to ask) How do I add to the formula that if the wall is more that 40', the 2nd Top Top Plate is 20'? I hope this clears it up. Even though it looks relatively simple, there is a lot going on with all of the plates expanding and contracting based on different conditions, stud layout changes, etc.
I do get errors when the plates disappear unfortunately, because the "extrusion is too thin", but as far as I've been able to find out so far that's just something I'll need to live with.
@DrakeCanyonArchitecture wrote:
How do I add to the formula that if the wall is more that 40', the 2nd Top Top Plate is 20'?
You need an Embedded IF Statement.
Can you tell what I am missing? I've tried a few different things and so far not sure what I did wrong.
Your Embedded IF state is incomplete.
"....Adjacent Wall Left)))" should be: "....Adjacent Wall Left), do this if true, do this if false))"
I didn't realize that the end of an embedded IF statement had to end with do this if true, do this if false, so I re-wrote the formula. In essence this is what I did, "if the wall length is greater than 40' the dimension will be 20', if the wall is less than 40' AND Through wall Left is checked, the result would be the wall length, minus the 1st Top Top Plate, minus Adjacent Wall Left, otherwise the result would be wall length, minus the 1st Top Top Plate, plus Adjacent Wall Left. Written like this:
if(Wall Length > 40', 20', if(and(Wall Length < 40', Through Wall Left), Wall Length - [1st Top Top Plate] - Adjacent Wall Left, Wall Length - [1st Top Top Plate] + Adjacent Wall Left)
I feel like the error is with the "if(and(Wall Length < 40', Through Wall Left)" part of the statement but can't for the life of me figure out what I'm doing wrong.
if(Wall Length > 40', 20', if(and(Wall Length < 40', Through Wall Left), Wall Length - [1st Top Top Plate] - Adjacent Wall Left, Wall Length - [1st Top Top Plate] + Adjacent Wall Left)
Looks like you are missing a couple of end parentheses, but other than that, it looks like a valid argument --notwithstanding of any typos you may have.
Like @barthbradley said, you need an imbedded statements. To avoid errors, write a formula in a way programmers would do when they code in Notepad. Like this:
if(condition,
result if true,
result if false
)
This word structure will help you understand where the parenthesis should be. Open up a Notepad and write as many embedded statements as you want:
if(condition,
result if true,
if(condition,
result if true,
if(condition,
result if true,
result if false
)
)
)
To get the formula, just remove brakes and blank spaces and there you have it. Copy the formula from Notepad and paste it into the family editor.
if(condition,result if true,if(condition,result if true,if(condition,result if true,result if false)))
This way, you can write as many conditions as you want and not get lost in the woods.
The problem is when the geometry becomes to thin or non existing.
Revit can't handle edge lengths below 0.8mm (0 1/32"), so I ensure nothing gets below that. For example:
if (user length < 0.8mm,
0,8mm
user length
)
We can even take a step further and assign visibility parameters:
if (user length < 0.8mm,
not visible,
visible
)
Keep in mind that even though you turned off the visibility of some pieces of geometry, those will be taken into the material take-off calculation. But if the geometry is very thin when invisible, that should not make much of a difference...
Andrej Ilić
phonetical: ændreɪ ilich
MSc Arch
Autodesk Expert Elite Alumni
@Ilic.Andrej wrote:We can even take a step further and assign visibility parameters:
if (user length < 0.8mm,
not visible,
visible
)
Edit:
Sorry, what I meant was:
Visibility parameter:
not(user length < 0.8mm)
Andrej Ilić
phonetical: ændreɪ ilich
MSc Arch
Autodesk Expert Elite Alumni
@barthbradley, one single parenthesis, lol. Things like that drive me nuts. Thank you so much for your help as always.
@Ilic.Andrej, Thank you for all that information! That helps a LOT. I'm only a few weeks in to learning how to write formulas in Revit and mainly getting bits and pieces of information as I go. I've tried to find some online training that pertains to just writing formulas but so far have not found anything. I've learned a lot of good stuff here in the forum. I very much appreciate the time that you guys take to help.
Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.