TM Let Revit Do Your Work: Using Formulae To Make Advanced Families Michael Vagg Bornhorst + Ward.

Slides:



Advertisements
Similar presentations
MS EXCEL is a spreadsheet application Excel covers: Calculation Graphic tools Pivot tables Macro programming language called VBA EXCEL is a part of MS.
Advertisements

Lesson 3 Working with Formulas.
Formulas, Ranges, and Functions. Formulas n Formulas perform operations such as addition, multiplication, and comparison on worksheet values. n Formulas.
Introduction to arrays
© Paradigm Publishing, Inc Excel 2013 Level 2 Unit 1Advanced Formatting, Formulas, and Data Management Chapter 2Advanced Functions and Formulas.
Parametric Modeling Chapter 7. Training Manual December 17, 2004 Inventory # Parametric Modeling Contents Dimension References Promoting Parameters.
Introduction to Excel Formulas, Functions and References.
Microsoft Office XP Microsoft Excel
Microsoft Excel. Click on “Start,” then “Microsoft Office Excel.”
Lecture Set 4 Data Types and Variables Part B – Variables, Constants, Expressions Conversion Rules Options Strict, Option Explicit Scope of Definition.
Lesson 14 Creating Formulas and Charting Data
Excel Using Formulas and Functions Microsoft Office 2010 Fundamentals 1.
Copyright 2003, Paradigm Publishing Inc. CHAPTER 3 BACKNEXTEND 3-1 LINKS TO OBJECTIVES AutoSum Button Mathematical Operators Mathematical Operators Formula.
1 Excel Lesson 3 Using Formulas and Functions Microsoft Office 2010 Fundamentals Story / Walls.
Excel Web App By: Ms. Fatima Shannag.
Introduction to Excel 2007 Part 3: Bar Graphs and Histograms Psych 209.
Microsoft® Small Basic The Math Object Estimated time to complete this lesson: 1 hour.
Numerical Roots & Radicals
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Exploring Formulas.
Technology Basics Creating Worksheet Formulas. 2 Understand Formulas Equations used to calculate values in cells are called formulas. Formulas consist.
Excel 2007 Part (2) Dr. Susan Al Naqshbandi
Spreadsheets Objective 6.02
XP Copyright 2003 Peter McDevitt 1 Microsoft Excel 2002 Lecture 2 – Working With Formulas and Functions.
Mathcad Variable Names A string of characters (including numbers and some “special” characters (e.g. #, %, _, and a few more) Cannot start with a number.
2 Explain advanced spreadsheet concepts and functions Advanced Calculations 1 Sabbir Saleh_Lecture_17_Computer Application_BBA.
Excel 2010 Formulas and Functions One of Excel's most useful features is that it allows users to create custom formulas to perform calculations on their.
Computer Science 1000 Spreadsheets II Permission to redistribute these slides is strictly prohibited without permission.
Computer Literacy BASICS
Section 1.2 The Real Number Line.
Working with Numbers in Alice - Converting to integers and to strings - Rounding numbers. - Truncating Numbers Samantha Huerta under the direction of Professor.
Microsoft Excel 2003 Illustrated Complete And Editing Worksheets Building.
1 Lesson 19 Creating Formulas and Charting Data Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
TMAT 103 Chapter 1 Fundamental Concepts. TMAT 103 §1.1 The Real Number System.
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.
CHAPTER 13 Creating a Workbook Part 2. Learning Objectives Work with cells and ranges Work with formulas and functions Preview and print a workbook 2.
Excel Worksheet # 5 Class Agenda Formulas & Functions
Lesson 5 Using FunctionUsing Function. Objectives.
06/10/ Working with Data. 206/10/2015 Learning Objectives Explain the circumstances when the following might be useful: Disabling buttons and.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 6 – Designing.
Chapter 8 iComponents and Parameters. After completing this chapter, you will be able to perform the following: –Create iMates –Change the display of.
1 ADVANCED MICROSOFT EXCEL Lesson 9 Applying Advanced Worksheets and Charts Options.
Examining data using Microsoft Access Queries Using Criteria and Calculations SESSION 3.2 This section covers specifying an exact match condition in a.
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 5 BACKNEXTEND 5-1 LINKS TO OBJECTIVES Transpose data Paste with mathematical calculation Paste.
Introduction to Programming with RAPTOR
Microsoft Access 2010 Chapter 10 Administering a Database System.
Performing Calculations—1 of 2 In addition to using queries to retrieve, update, sort, and filter data in a database, you can use a query to perform calculations.
Excel Web App By: Ms. Fatima Shannag.
Lesson 4.  After a table has been created, you may need to modify it. You can make many changes to a table—or other database object—using its property.
Changing Bases.
Changing Bases. Base 10: example number ³ 10² 10¹ 10 ⁰ ₁₀ 10³∙2 + 10²∙1 + 10¹∙ ⁰ ∙0 = 2120 ₁₀ Implied base 10 Base 8: 4110 ₈ 8³ 8².
XP 1 ﴀ New Perspectives on Microsoft Office 2003, Premium Edition Excel Tutorial 2 Microsoft Office Excel 2003 Tutorial 2 – Working With Formulas and Functions.
COMPUTER PROGRAMMING I SUMMER Apply operators and Boolean expressions.
Unit 3: Text, Fields & Tables DT2510: Advanced CAD Methods.
Querying Databases A query is a program that allows us to VIEW the data or operate on the data Several types of queries –Select query –Merge query –Summary.
Controlling Program Flow with Decision Structures.
Microsoft Visual Basic 2012 CHAPTER FOUR Variables and Arithmetic Operations.
Access Module Implementing a Database with Microsoft Access A Great Module on Your CD.
CS 115 Lecture 5 Math library; building a project Taken from notes by Dr. Neil Moore.
Data Validation and Protecting Workbook
CMSC201 Computer Science I for Majors Lecture 03 – Operators
Microsoft Excel 2003 Illustrated Complete
Unit 42 : Spreadsheet Modelling
Variables and Arithmetic Operations
Lesson 4 Using Basic Formulas
Working with Formulas and Functions
Chapter 9 Basic Algebra © 2010 Pearson Education, Inc. All rights reserved.
Working with Formulas and Functions
Introduction to Excel 2007 Part 3: Bar Graphs and Histograms
5.03 Apply operators and Boolean expressions
Presentation transcript:

TM Let Revit Do Your Work: Using Formulae To Make Advanced Families Michael Vagg Bornhorst + Ward

Revit Technology Conference 2010 Parameter Data Types Arithmetic Functions Example 1 – Shear Stud Conditional Statements Rounding Trigonometry Example 2 – Bracing Wall Controlling Visibility Example 3 – Reinforcement INTRODUCTION

Revit Technology Conference 2010 Selecting the correct parameter type early can save a lot of frustration while you’re working on your formulae. Before creating your parameters that will be formula driven, think carefully about the units involved. This is one of the most frustrating errors while building families: If you do come across this error, note that you cannot change the data type after the parameter is created. To change it, copy your formula to the clipboard, delete the current parameter, and recreate a new one of the correct data type. You can review the Units for the various types by using the “Project Units” tool on the “Manage” tab. PARAMETER DATA TYPES

Revit Technology Conference 2010 Most data types are self-explanatory. Following are descriptions of those that we’ll be using that may be a little obscure. NON-NUMERIC TYPES Text - Simple text strings - Can be used as the result of a conditional statement, but not as the test condition (we’ll cover this a little later) Yes/No - Used to evaluate a condition, and returns either Yes or No. - The conditional statement is implied, as are the return values NUMERIC TYPES Integer - Unitless whole number Number - Unitless real (decimal) number PARAMETER DATA TYPES (Cont…)

Revit Technology Conference 2010 DescriptionOperatorSyntax Addition+Length + Width Subtraction-Length - Width Multiplication*Length * 2 Division/Length / 2 Square Rootsqrtsqrt(9) Exponentiation^x ^ y Logarithmloglog(100) Exponential Functionexpexp(2) Absolute Valueabsabs(-25) Revit adheres to the Order of Operation in formulae, so the order of precedence will be Parentheses, Exponentiation, Division/Multiplication, Addition/Subtraction ARITHMETIC FUNCTIONS

Revit Technology Conference 2010 Open “Example 1.rvt” in Revit Structure 2011 EXAMPLE 1 – SHEAR STUD

Revit Technology Conference 2010 At present, the shear stud is predominantly static, with only the Height varied by user input. We now want to change this so that the user can also input the stud diameter. In doing so, this will also vary the stud head diameter. The relationship between the stud & head diameters is as follows: 2 x √2.5(Stud Dia.²) EXAMPLE 1 – SHEAR STUD (Cont…) In Revit, this can be expressed in a formula as: 2 * (sqrt(2.5 * (Stud Diameter ^ 2)))

Revit Technology Conference Edit the family In the Project Browser, under Families > Generic Models, right click on Shear Stud (the family, not the type) & select edit. EXAMPLE 1 – SHEAR STUD (Cont…) 2.Go to the plan view Again in the Project Browser, open the Ref. Level view under Views > Floor Plans.

Revit Technology Conference Assign labels to dimensions Assign the Head Diameter label to the 50mm dimension, and the Stud Diameter label to the 12mm dimension. EXAMPLE 1 – SHEAR STUD (Cont…) 4.Add the formula Open the Family Types dialog, and add our formula to Head Diameter.

Revit Technology Conference 2010 Conditional statements allow family builders to determine actions based on the values of other parameters. These have the form: if (test condition, true result, false result) If the test condition proves true, the conditional statement will return the value of the “true result”. Should it prove false, it will return the “false result”. You can use the following Logical Operators to build you test condition: DescriptionOperatorSyntax Greater Than>x > 10 Less Than<x < 10 Equal To=x = 10 Both statements are trueANDand(x > 10, y < 10) One of the statements are trueORor(x > 10, x = 10) None of the statements are trueNOTnot(x > 10, y < 10) CONDITIONAL STATEMENTS

Revit Technology Conference 2010 Notice that there is no “Greater than or equal to …” operator (or its “Lesser than” brother)? This is achievable simply by using Less Than “ < “ in conjunction with the not( ). So “not(X < Y)” will effectively give you “X ≥ Y” Also, Revit doesn’t have in-built math constants that many of you may be used to. One of the most used of these is PI (π). As this is an irrational number, there is no method to accurately depict this in a formula. You can create your own Number parameter to approximate its value, but keep the innaccuracy in mind. A NOTE ON MISSING OPERATORS & CONSTANTS

Revit Technology Conference 2010 Whilst we have achieved our goal of making the Shear Stud parametric, with a formula-driven head diameter, note that the head diameter value is still accessible for the user. This is because we have an unconditional relationship between the 2 parameters, so altering either of the 2 will change the other in accordance with our formula. At times this may be the desired result, but in this case, the shear stud size will always be expressed as the stud diameter, and the head will always be a function of that. We can effectively lock this parameter off by encasing the formula in a conditional statement. if(Stud Diameter > 0 mm, 2 * (sqrt(2.5 * (Stud Diameter ^ 2))), 0 mm) Note that the value field has now been disabled? EXAMPLE 1 – SHEAR STUD (Revisited)

Revit Technology Conference 2010 General rounding in accordance with standard math convention can be achieved using an Integer data type. So, any number up to, but not including.5 will round down, while numbers.5 and above will round up. To force upward or downward rounding, use a formula in an Integer parameter to Add or Subtract (respectively) 0.49 to/from the original value. This new value will then be automatically rounded by the data type as above. It is also possible to round to any increment that you need. Below is an example of rounding to a 50 increment. ROUNDING

Revit Technology Conference 2010 DescriptionOperatorSyntax SineSINsin(30) CosineCOScos(60) TangentTANtan(45) ArcsineASINasin(1) ArccosineACOSacos(1) ArctangentATANatan(1) Refresher: Sin  = B / C Cos  = A / C Tan  = B / A TRIGONOMETERY FUNCTIONS  C B A

Revit Technology Conference 2010 Formulae aren’t limited to use in family parameters – you can apply them to calculated values in schedules as well Open “Example 2.rvt” in Revit Structure 2011 EXAMPLE 2 – BRACING WALL

Revit Technology Conference 2010 Excerpt from AS – Table 8.18 EXAMPLE 2 – BRACING WALL (Cont…)

Revit Technology Conference 2010 Formulae aren’t restricted to family parameters. They can be used in schedules as well. Often, particularly with system families, using calculated values in schedules is the only way to achieve the outcome that you’re after. In this example, we have 2 main requirements. We need to make sure that the wall length and angle restrictions are adhered to. We also want to round the wall length to a 300mm increment. We’ll start with the wall length. EXAMPLE 2 – BRACING WALL (Cont…)

Revit Technology Conference 2010 To round to a specified increment, we need 2 parameters. This will allow us to divide the original value by our increment, and round to a whole number. We then multiply this whole number by our increment value to result in the rounded value. The first parameter (“Length Rounding”) needs to a be an Integer type. In this case, we want to always round down to a multiple of 300. EXAMPLE 2 – BRACING WALL (Cont…) (Length / 300 mm) Our second parameter “Bracing Length” will then check that the wall length falls between the required values of 1800 to 2700, and if so, create the rounded value. In this case, if the wall length falls outside of these values, in cannot be used for bracing, so will have a bracing length of zero. if(or(Length Maximum Length), 0 mm, Length Rounding * 300 mm)

Revit Technology Conference 2010 EXAMPLE 2 – BRACING WALL (Cont…) 1.Edit the schedule Right click on the schedule and select Edit, then unhide all columns. 2.Add the rounding formulae On the Fields tab of the Schedule Properties, select the Length Rounding parameter, and click Edit. Next, add the formula to the Bracing Length parameter in the same manner.

Revit Technology Conference 2010 We now need to check the angle of the wall. To do this, we’ll use the Calculated Wall Height & Length parameters with a trigonometry function. To calculate this, the math equation would be: Tan  = Calculated Wall Height / Length or  = Tan -1 (Calculated Wall Height / Length) EXAMPLE 2 – BRACING WALL (Cont…) In Revit, we can express this as: atan(Calculated Wall Height / Length) As we need to check that the angle is between an upper and lower limit, we’ll need a conditional statement, but in this case it will be implied, as we’re using a Yes/No parameter type. not(or(atan(Calculated Wall Height / Length) 60°))

Revit Technology Conference 2010 EXAMPLE 2 – BRACING WALL (Cont…) 3.Check the angle of the wall Add the parameter to check that the wall angle is between our required values. Now, as you move the extents & height of the wall, you’ll notice the bracing capacity will change in accordance with the rules that we have just defined.

Revit Technology Conference 2010 Visibility can be controlled using Yes/No parameters. These can be made to act based on users’ input, geometric constraints, or a combination of both. EXAMPLE 3 – REINFORCEMENT In Revit Structure 2011, open “Example 3.rvt”. The family on the left is complete, and behaves in the manor that we are seeking. Notice that when you move the extent line above or below the end of the reinforcing bar, a line appears to “link” the bar to it’s extent line? We’ll now add this behaviour to the family on the right… CONTROLLING VISIBILITY

Revit Technology Conference 2010 We need two conditions to prove true for our extension line to be displayed. First, we need to ensure that the user has indicated that they want the extent arrow display based on the value of the Yes/No parameter “Display Extent Line”. The second condition is based on the geometry of the component. We need to check that the extent line is outside the limits of the bar. EXAMPLE 3 – REINFORCEMENT (Cont…) To achieve this, we’ll need the AND logical operator, as we need both cases to prove true in order for our conditional statement to be true. And( …, … ) We’ll use the first argument to check that “Display Extent Line” is true and(Display Extent Line, … ) The calculate whether our geometry suits and(Display Extent Line, Extent Location < Extremity – Bar Extension)

Revit Technology Conference 2010 EXAMPLE 3 (Cont…) 1.Edit the family Select the right-hand component and edit the family. Note the extension lines have their visibility linked to a parameter… 2.Add the formulae In the Family Type editor, enter the formulae that we’ve just developed, then reload the family into the project

Revit Technology Conference 2010 Michael Vagg Questions