Presentation on theme: "SE427-1: The IF's of Revit® Ken Murphy"— Presentation transcript:
1SE427-1: The IF's of Revit® Ken Murphy Image courtesy of Hobart, Yañez, Ramos, Maguey, and MartínezSE427-1: The IF's of Revit®Ken MurphyBIM Manager, Thornton Tomasetti Inc.
2About me Corporate BIM Manager for Thornton Tomasetti Structural Engineering firm with over 500 staffArchitectural Technology graduate from DIT Dublin, IrelandAutodesk user since 1993 (AutoCAD 11 for DOS)
3Key Learning for this class: What’s ‘IF’ all about?How and where IF statements can be used?Tips & Best PracticesExamples:Concrete Column Family with Hold / Cardinal PointEmbedded “Error Message” in framing familySteel Embed Plate with nested & arrayed Shear StudQuantity Schedule in project using IF StatementsUsing Filters to visually data mine the model
5What's ‘IF’ all about:Subtle area of Revit that is not documented in depth.Can extend the capabilities of many schedules and families.No need for API programming etc. to use these capabilities.
6What's ‘IF’ all about: The basics of IF statement syntax IF ( something , then do this , or else do this )
7What's ‘IF’ all about:Families and Schedules in Revit can contain Conditional ‘IF’ statementsThese are added as formulae inside parameters in FamiliesIn Schedules they are added as “Calculated Values”
9What's ‘IF’ all about: Quick examples of IF’s DEPTH parameter driven by IF statement based on LENGTH
10What's ‘IF’ all about: Quick examples of IF’s YES/NO parameter based on other YES/NOUsing ‘NOT’ to automatically apply a YES/NO condition
11What's ‘IF’ all about:Quick examples of IF’sYES/NO parameters
12What's ‘IF’ all about: Quick examples of IF’s TEXT parameter driven by IF statement based on LENGTHTEXT parameter based off many IF conditions
13What's ‘IF’ all about: Quick examples of IF’s COST parameter driven by IF based off LENGTH and YES/NO parameter for FIREPROOFINGAND statement
14What's ‘IF’ all about: Quick examples of IF’s OR statement Calculate Slope / 12 based on angle
15What's ‘IF’ all about: Quick examples of IF’s Multiple IF statements using parameters of LENGTH, TEXT, YES/NO and CURRENCY type.
16What's ‘IF’ all about:Doing it the wrong way (Cardinal Hold Point Family)
17Tips & Best Practices:Parameter names are always case sensitive, make sure to type them exactly or IF statements will not work!
18Tips & Best Practices:Avoid using a dash ‘-‘ or hyphen in parameters names(Revit will think you are trying to subtract something in the middle of your statement)
19Tips & Best Practices:Remember that mixed units be converted to a common form to be able to calculate a parameter, e.g. multiplying LENGTH X AREA requires that you divide one of the values by 1.Weight = Volume / 1 * 490 (490 represents the density of steel)
20Tips & Best Practices:Avoid naming a parameter as a number, as this will cause errors in your statements.If you really want to name a parameter as a number, first create the parameter as a text name, e.g. “EIGHT”, then create the conditional IF statement referring to that parameter, and then rename the parameter called “EIGHT” after you have successfully made the IF.)
21Tips & Best Practices:It is currently not possible to concatenate parameter values to combine text or numbers. The best solution to this if you want to display the concatenated information in a Label is to make multi-parameter labels with the different values shown.
22Tips & Best Practices:If you want a TEXT parameter to contain no characters or just be blank you can use the format “ ”
28Example 5:Using Filters to visually mine data from the model:
29Summary: IF’s can extend your model in many ways Geometry, numbers, arrays, lengths, angles etc can all be driven by IF’sPossibilities are endless for conditional statementsSchedules can also be a powerful tool for QA or calcsFilters are a great way to navigate conditions
33Now revit is looking for a number yet your units when for instance going cost*area is m�.... Try this cost*(Area/1) This will effectively remove the units from the valueIF (PANEL TYPE = 1 , WIDTH * 2 , 0)If is implied in Yes/No parameters. All you need is: Check Box Parameter = Void DTR >0‘if(COST_PER_POUND < 40, "F", if(COST_PER_POUND < 100, "D", if(COST_PER_POUND < 200, "C", if(COST_PER_POUND < 250, "B", if(COST_PER_POUND < 300, "A", "FAIL")))))if(Q9_OVERRIDE, "HIDE", if(and(Q9_AGREE, Q9_RELEVANT), "Red", (if(and(Q9_AGREE, not(Q9_RELEVANT)), "Blue", "Green"))))not(or(STEEL GRADE A, STEEL GRADE B))
34minAB =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<1Tap Thickness = if(Tap Diameter < 0' 1 1/4", 0' 1 1/16", if(Tap Diameter < 0' 2", 0' 1 5/16", if(Tap Diameter < 0' 2 1/2", 0' 1 5/8", if(Tap Diameter < 0' 3", 0' 1 5/8", if(Tap Diameter < 0' 3 1/2", 0' 1 3/4", if(Tap Diameter < 0' 5", 0' 2 1/4", 0' 3 11/16"))))))I learned a very neat trick yesterday. You ever get 'inconsistent units' as result from a formula? For instance if you wanted to multiply moolah with area with integer with bingzoombang? There's one real obvious way to make everything unitless. Example: =(Cost/1$)*(Area/1m²)*(bingzoombang/1bzb)
35You can use numeric 'text' in formulae with a bit of clever tinkering You can use numeric 'text' in formulae with a bit of clever tinkering. Rename your 99 parameter to val1 and insert it in your formula. then rename your val1 parameter back to 99. voilà you have a numerically named parameter in your formula....We calculated the cross sectional area Formula |3.14*(bar diameter^2)/4| We then figured how many 20' bars we needed with formulas Created a linear feet of bar needed with formulas Then for tonnage we used the following formula |(((cross Sectional Area/144cf)*Linear Feet of Bar Needed*144)*490)/2000