fbpx
M

Using If Statements for Yes/No Parameters

Have you ever wanted to control the visibility of a Revit family like you can with Design Options in your projects? We’ll explore how you can create multiple design options in a Revit family using If statement formulas in a Yes/No parameter.

Establishing the Formula

First, we need to establish what the formula is. We will use If (condition, true, false). When converted to the Yes/No parameter, it will change to If (condition, yes, no).

We need to set true or false statements where true = yes and false = no. Consider the example 1 < 2. In this statement, we ask if one is less than two, which is true. Therefore, Revit will count this as a true statement. If we ask the opposite (2 < 1), Revit will count this as a false statement.

“Less Than” Condition

Example 1: If (Height < 4′  6″, 1 < 2, 2 < 1)

In this statement, we ask “is the height less than 4 foot 6 inches?” If the answer is “True” (Height = 4’), the true value is returned. The result will equal “Yes” and the parameter is activated. If the answer is “False” (Height = 6’) the “False” value is returned. The result will equal “No” and the parameter is deactivated.

Let’s dive a little deeper. The condition is If (Height < 4’ 6”). We ask if the object’s height is less than 4’ 6” to activate/deactivate the 3 Shelves Yes/No parameter.

First, break down the “Yes” statement (1 < 2), which is “True.” If the Height is less than 4’ 6” the statement will activate the 3 Shelves Yes/No parameter.

The “No” statement (2 < 1), is “False.” If the Height is greater than 4’ 6” the parameter will deactivate the 3 Shelves Yes/No parameter.

“Greater Than” Condition

Example 2: If (Height > 4′  6″, 1 < 2, 2 < 1)

In this statement, we ask “is height greater than 4 foot 6 inches?” We are asking whether the objects Height is greater than 4’ 6” to activate/deactivate the 4 Shelves Yes/No parameter.

First, break down the “Yes” statement (1 < 2), which is “True.” If the height is greater than 4’ 6” the statement will activate the 4 Shelves Yes/No parameter.

The “No” statement is (2 < 1) is “False.” If the height is greater than 4’ 6” the statement will deactivate the 4 Shelves Yes/No parameter.

Conclusion

This process is a simple way to create design options in your Revit families by using If statements in your Yes/No parameters. By using these methods, you can easily control the visibility of a Revit family.

For more information on other Autodesk products, please visit our Autodesk Products page.

Follow ATG on LinkedInFacebookTwitter and YouTube for 24/7 access to top-notch technical content.

This blog is written by AEC Technical Specialist Quentin Worm. If you have any questions or need help with your Revit needs, please email us at whyATG@atgusa.com.

Contact Us

Drop us a note. We love notes.

    I'd Like More Info On:

    Insights

    Events | See All

    Wed 25

    CTC Webinar: New features in Civil 3D Corridor Mapper

    November 25 @ 12:00 PM - 1:00 PM CST

    Workflows & Solutions | See All

    News  | See All

    Our Latest
    Success Stories

    See All

     

    Providing Solutions to Grow a Long-Standing Relationship

    Customer ChallengeButler Design Group is an architectural firm in Phoenix, AZ dedicated to creating design solutions for their client’s functional, aesthetic and budgetary needs. Through partnership with ATG, BDG realized the...

    Eliminating Repetitive Tasks to Accelerate Workflows

    Customer ChallengeTyson Foods, Inc., based in Springdale, Arkansas, was founded in 1935 with a goal to deliver quality chicken and build strong relationships with independent farms across America. The drafting team at Tyson...
    Success Story: BIMBOX

    Success Story: Groundbreaking ROI With BIMBOX

    Success Story Overview Formerly known as Collaboration for Revit or C4R, BIM360 Design allows multiple stakeholders to contribute to a central model, or aggregation of models, in the cloud. Many people experience poor...

    Specialized Workflows

    Overview JB Henderson Construction, Inc., commemorated its 60th year in business in May 2019. Based in Albuquerque, the company has an extensive list of customers including national laboratories, universities, hospitals, and...

    Saving a Historic Landmark

    Overview Old Hattiesburg High School was constructed in 1911, and was substantially enlarged during a second phase of construction 10 years later. It served as the main high school for Hattiesburg, Miss., until 1959. Since then,...

    BIM Batch Suite

    Projects & Families Upgrader Upgrade multiple projects and templates at once with this tool. Automatically adjust linked Revit® and CAD file paths to new locations. Easily select files in an intuitive user interface. Migrate...

    LIVE360

    Overview Ball Architects is a company devoted to housing for the greater good, with housing development projects across 10 states. Ball Architects had differing levels of experience with Autodesk Revit and needed an assessment...

    BIM 360

    Overview ATG had the opportunity to work with Bernhard TME, and assist their team with completing a new campus for Arkansas Children’s Northwest. One of the primary takeaways for ATG was ensuring the success of the combined...

    Investing in Hardware

    Overview McKinstry is a national leader in designing, constructing, operating and maintaining high-performing buildings. From new construction and ongoing operations, to adaptive reuse, energy retrofits and advanced renewable...

    Maintenance to Subscription

    Customer ChallengeM3 Engineering has projects all over the world that require leveraging an extensive portfolio of Autodesk software. ATG worked in conjunction with M3’s IT and leadership teams to ensure that M3 had the tools...