I've noticed a quite a few posts giving out formula tricks. It would be great if all of them where in one place. I'll start it off:
Convert angle to __in 12 roof slope....
|
I've noticed a quite a few posts giving out formula tricks. It would be great if all of them where in one place. I'll start it off:
Convert angle to __in 12 roof slope....
I only discovered recently that there's an IF capability (I was looking at "Revit Structure 2009 User's Guide > Creating Your Own Components (Families) > Family Types > Using Formulas for Numerical Parameters > Valid Formula Syntax and Abbreviations" but didn't see "Revit Structure 2009 User's Guide > Creating Your Own Components (Families) > Family Types > Using Formulas for Numerical Parameters > Conditional Statements in Formulas"), but still no MIN and MAX functions:
minAB =IF(A<B,A,B)
maxAB =IF(A<B,B,A)
I also don't see TRUE or FALSE constants, so:
TRUE =1=1
FALSE = 1<1
there are of course many other ways of doing all 4 of these...
Anyone know of a formula to convert a Slope (unit) into an Angle?
yeah, by using sin, cos, and tan you can have a formula that will set this up for you. i don't have the time to get into it now but if you go to Revitcity.com and check out some of the trusses that have been created those can be a great starting point for what your looking for.
Hope this helps.
Last edited by Crosseyed; 2009-04-01 at 04:14 PM.
There are a few other possibilities which may work for you. You can use NOT statements for >/= "if(not(A>B,x)" will yield the same answers as an excel formula of "ifA</=B,x"
Also you can use Yes/ No parameters for true false statements. Yes/ no parameters imply the if already so the syntax is somewhat different.
A= yes/ no parameter
B and C= length parameters
A=B>C if B is greater than C then A will turn on
C=A,4'-0",2'-0" If A is turned on then C=4' if A is off then 2'
Nick
So I had some problems with "C=A, 4'-0", 2'-0"". The error is unexpected comma.
My situation is as follows:
I have a length parameter that is called Top Hole True.
I have a yes/no parameter that is called Top Hole.
I want Top Hole True change its value based on the yes/no parameter Top Hole's value.
Top Hole True = Top Hole, .875", .5"
Any ideas?
Thanks
jw
The problem has been solved...
The correct syntax I needed:
Top Hole True = If(Top Hole, .875", .5")
not
Top Hole True = Top Hole, .875", .5"
thanks...
I'm working on a Wall Opening family that will have the potential of (2) symbolic lines:
I'm using shared parameters in hopes of being able to setup a helpful schedule.
- one for the Wall Lintel
- one for the Veneer Lintel (as required)
And furthermore, I want to be able to TAG these openings, using only ONE tag family to accomplish a couple of different things: If the wall has NO VENEER, then the tag would simply report the value for the Wall Lintel. If the wall DOES HAVE A VENEER, then the tag would report the Wall Lintel type AND "LL" for the Veneer Lintel. Make sense?
The Veneer Lintel is the only one giving me trouble.
In my Wall Opening family, I've created 2 shared parameters related to the Veneer Lintel:
Veneer Lintel (Yes/No, Instance parameter)
Veneer Lintel Tag (Text, Instance parameter) the Tag is pointed to this parameter
So, I'm trying to set the Veneer Lintel Tag to read "LL" if the Veneer Lintel parameter is checked (True). I want it to be blank (empty) if Veneer Lintel parameter is unchecked (False).
Am I going about this the right way?
I've read lots of forum threads and I've searched Revit Help, and still can't get it right.
I'm guessing that the formula for Veneer Lintel Tag would look something like:
IF (Veneer Lintel, LL, <empty>)
Thanks for your help!
You will need to link the tag to a text parameter. The text parameter formula would read
If(Veneer Lintel,"LL","")
HTH
Nick
THANKS!
Someone on the RevitCity forum replied with the exact same advice and of course it works GREAT!