{"id":250,"date":"2013-12-17T03:47:05","date_gmt":"2013-12-17T03:47:05","guid":{"rendered":"https:\/\/www.xrev.com.au\/news\/?p=250"},"modified":"2013-12-17T03:47:05","modified_gmt":"2013-12-17T03:47:05","slug":"conditional-statements-pushing-the-limits-of-revit","status":"publish","type":"post","link":"https:\/\/www.xrev.com.au\/news\/conditional-statements-pushing-the-limits-of-revit\/","title":{"rendered":"Conditional Statements &#8211; pushing the limits of Revit"},"content":{"rendered":"<p>So last week I was tasked with create a duct mounted adjustable pitch axial flow fan. \u00a0I was told there were 672 variations permissable and provided a spreadsheet of sizes and a diagram explaining how it matched up.<\/p>\n<div id=\"attachment_251\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2013\/12\/Fantech-Adjustable-Pitch-Axial-Flow-Fan.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-251\" class=\"size-large wp-image-251\" title=\"Adjustable Pitch Axial Flow Fan\" src=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2013\/12\/Fantech-Adjustable-Pitch-Axial-Flow-Fan-1024x867.png\" alt=\"\" width=\"640\" height=\"541\" srcset=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2013\/12\/Fantech-Adjustable-Pitch-Axial-Flow-Fan-1024x867.png 1024w, https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2013\/12\/Fantech-Adjustable-Pitch-Axial-Flow-Fan-300x254.png 300w, https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2013\/12\/Fantech-Adjustable-Pitch-Axial-Flow-Fan.png 1101w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><p id=\"caption-attachment-251\" class=\"wp-caption-text\">Adjustable Pitch Axial Flow Fan<\/p><\/div>\n<p>Sure I could have just generated a type catalog of the sizes, but then what&#8217;s to stop the end user going into the type and instance parameters and changing values, which may created unavailable combinations or worse, break the family because of invalid sizing combinations&#8230;<\/p>\n<p><strong>Solution: Conditional Statements<\/strong><\/p>\n<p>For those who have attended some of my RTC presentations you may have your own copy of my nested If Statement generator which I created in Excel as I have given it away to some attendees. \u00a0Below is an image of what it is. \u00a0Its not that complicated, just some concatenate formulas nested into each other&#8230;<\/p>\n<div id=\"attachment_252\" style=\"width: 250px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2013\/12\/Fantech-Excel-Generator.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-252\" class=\"size-medium wp-image-252\" title=\"Excel Generator\" src=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2013\/12\/Fantech-Excel-Generator-240x300.png\" alt=\"\" width=\"240\" height=\"300\" srcset=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2013\/12\/Fantech-Excel-Generator-240x300.png 240w, https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2013\/12\/Fantech-Excel-Generator.png 527w\" sizes=\"auto, (max-width: 240px) 100vw, 240px\" \/><\/a><p id=\"caption-attachment-252\" class=\"wp-caption-text\">Excel Revit IF Statement Generator<\/p><\/div>\n<p>The big advantage is it doesn&#8217;t matter how many you nest into each other, just grab the bottom line and paste into Revit.<\/p>\n<p><strong>Revit Limitations<\/strong><\/p>\n<p>To tell the truth the previous maximum IF Statements I&#8217;ve tried is around 200, this time there were nearly 700, and many different parameters each requiring a formula of this complexity. \u00a0 What I found was Revit would crash at around 580 conditional statements in a single formula&#8230; \u00a0Surely Autodesk should know someone would try and do this, lol!<\/p>\n<p>So how to get around this limitation, my first thought was to try and use &#8220;And&#8221; and &#8220;OR&#8221; conditions to try and reduce the number of required conditions. \u00a0However, this was going to be extremely tedious and there would still be 168+&#8230; \u00a0So then I decided to simply split across a couple of parameters. \u00a0EG: I had 500 conditions in one parameter then linked to a different parameter with the remaining conditions. \u00a0SOLVED!<\/p>\n<div id=\"attachment_253\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2013\/12\/Fantach-Formulas.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-253\" class=\"size-medium wp-image-253\" title=\"Revit Formulas\" src=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2013\/12\/Fantach-Formulas-300x216.png\" alt=\"\" width=\"300\" height=\"216\" srcset=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2013\/12\/Fantach-Formulas-300x216.png 300w, https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2013\/12\/Fantach-Formulas.png 813w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-253\" class=\"wp-caption-text\">Revit Formulas<\/p><\/div>\n<p>I did note a large performance hit when changing parameters in the family editor. \u00a0Changing any values would take 5-15 seconds. \u00a0However, testing in a project and the changes are instant! \u00a0So not sure why performance is fine in a project.<\/p>\n<p>I still created a type catalog of all 672 types to make it quick and easily to select the appropriate model.<\/p>\n<p>I hope someone finds this useful!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So last week I was tasked with create a duct mounted adjustable pitch axial flow fan. \u00a0I was told there were 672 variations permissable and provided a spreadsheet of sizes and a diagram explaining how it matched up. Sure I &hellip; <a href=\"https:\/\/www.xrev.com.au\/news\/conditional-statements-pushing-the-limits-of-revit\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[29,38,26,9],"class_list":["post-250","post","type-post","status-publish","format-standard","hentry","category-services","tag-conditional-statements","tag-family-creation","tag-formulas","tag-revit"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.xrev.com.au\/news\/wp-json\/wp\/v2\/posts\/250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xrev.com.au\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xrev.com.au\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xrev.com.au\/news\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xrev.com.au\/news\/wp-json\/wp\/v2\/comments?post=250"}],"version-history":[{"count":0,"href":"https:\/\/www.xrev.com.au\/news\/wp-json\/wp\/v2\/posts\/250\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xrev.com.au\/news\/wp-json\/wp\/v2\/media?parent=250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xrev.com.au\/news\/wp-json\/wp\/v2\/categories?post=250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xrev.com.au\/news\/wp-json\/wp\/v2\/tags?post=250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}