Forums
Forums >> Revit Building >> Technical Support >> Conditional Syntax not working!!!
|
|
active
Joined: Fri, Feb 24, 2006
1 Posts No Rating |
Ive tried this several differnt ways with no avail can someone shed some light here! IF (Width > 2' , "DAx1" , IF (Width < 2' , "DA") or this IF (Width >2' , "DAx1" , "DA"
|
This user is offline |
|
|
|
active
Joined: Sun, Apr 25, 2004
1207 Posts
|
What are the field names and what type of fields are they? Assuming you want to evaluate a 'length' and the field DA is a 'length' Then the fomula is simply: If (Width>2', DA*1,DA) folowing the Revit logic of IF (<condition>, <result-if-true>, <result-if-false> No quotation marks are need, the field names are case senitive, and field types must be compatible.
-----------------------------------
Tom www.reviteer.com http://twitter.com/Reviteer |
This user is offline |
View Website
|
|
site moderator|||
Joined: Fri, Feb 10, 2006
1874 Posts
|
From a previous post by Tom Dorner Below is the Revit help file which explains it pretty well. ------------------------------------------------------------------------------------------------------------------------ You can use conditional statements in formulas to define actions in a family that depend on the state of other parameters. With conditional statements, the software enters values for a parameter based on whether a specified condition is satisfied. Conditional statements are useful in certain circumstances; however, they make families more complex and should be used only when necessary. For most type parameters, conditional statements are unnecessary, because the type parameter itself is like a conditional statement: If this is the type, then set this parameter to a specified value. Instance parameters are a more productive place to use conditional statements, particularly when they are used to set a parameter that does not vary continuously. Syntax for Conditional Statements A conditional statement uses this structure: IF (, ,) This means that the values entered for the parameter depend on whether the condition is satisfied (true) or not satisfied (false). If the condition is true, the software returns the true value. If the condition is false, it returns the false value. Conditional statements can contain numeric values, numeric parameter names, and Yes/No parameters. You can use the following comparisons in a condition: <, >, =. You can also use Boolean operators with a conditional statement: AND, OR, NOT. Currently, <= and >= are not implemented. To express such a comparison, you can use a logical NOT. For example, a<=b can be entered as NOT(a>b). The following are sample formulas that use conditional statements. Simple IF: =IF (Length < 3000mm, 200mm, 300mm) IF with a text parameter: =IF (Length > 35', “String1”, “String2&rdquo) IF with logical AND: =IF ( AND (x = 1 , y = 2), 8 , 3 ) IF with logical OR: =IF ( OR ( A = 1 , B = 3 ) , 8 , 3 ) Embedded IF statements: =IF ( Length < 35' , 2' 6" , IF ( Length < 45' , 3' , IF ( Length < 55' , 5' , 8' ) ) ) IF with Yes/No condition: =Length > 40 (Note that both the condition and the results are implied.)
Edited on: Thu, Feb 22, 2007 at 11:39:45 AM
-----------------------------------
best regards, coreed,aia bmpArchitects,Inc. "Revit has to be implemented, Not installed." Long Live Revit |
This user is offline |
|
|
active
Joined: Mon, Jun 19, 2006
144 Posts
|
If you go to AUGI you will notice that I posted an answer to this question there. I think it is what you were looking for.
|
This user is offline |
|
|
|
Similar Threads |
Conditional statemnent for negative value of degree celcius not working |
Revit Building >> Technical Support
|
Sun, Jan 16, 2011 at 11:01:10 PM
|
2
|
Arch 2012 Conditional Formatting |
Revit Building >> Technical Support
|
Tue, Sep 18, 2012 at 11:08:38 AM
|
1
|
Formula to not exceed value in family |
Revit Building >> Technical Support
|
Tue, May 20, 2008 at 12:34:26 PM
|
1
|
Formula Syntax for PI |
Revit Structure >> Technical Support
|
Thu, Sep 13, 2012 at 6:20:34 PM
|
6
|
Conditional statement |
Revit Building >> Technical Support
|
Thu, Jun 27, 2013 at 9:58:47 AM
|
4
|
|
|
Site Stats
Members: | 2056478 | Objects: | 23071 | Forum Posts: | 152325 | Job Listings: | 3 |
|