{"id":295,"date":"2015-03-21T22:03:14","date_gmt":"2015-03-21T22:03:14","guid":{"rendered":"https:\/\/www.xrev.com.au\/news\/?p=295"},"modified":"2015-03-21T22:03:14","modified_gmt":"2015-03-21T22:03:14","slug":"family-creation-bi-folding-windows-or-doors","status":"publish","type":"post","link":"https:\/\/www.xrev.com.au\/news\/family-creation-bi-folding-windows-or-doors\/","title":{"rendered":"Family Creation &#8211; Bi-Folding Windows or Doors"},"content":{"rendered":"<p>Did you ever want to create that single Bi-Folding window or door that could handle every possible configuration? \u00a0Well the other day I did&#8230;<\/p>\n<p>What is every possible configuration?<\/p>\n<ul>\n<li>Obviously Height\/Width Control<\/li>\n<li>Obviously Position within the Wall<\/li>\n<li>Obviously Number of Panels<\/li>\n<li>Panels Stacking Left &amp; Panels Stacking Right<\/li>\n<li>Single or Double Glazed<\/li>\n<li>Sub-Sill and Sub-Head Options<\/li>\n<li>Glass Thickness<\/li>\n<\/ul>\n<p style=\"text-align: center;\">\n<div id=\"attachment_296\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-3d-Configs.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-296\" class=\"size-full wp-image-296 \" title=\"Bi-Folding Window\" src=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-3d-Configs.jpg\" alt=\"\" width=\"600\" height=\"185\" srcset=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-3d-Configs.jpg 1744w, https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-3d-Configs-300x92.jpg 300w, https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-3d-Configs-1024x316.jpg 1024w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-296\" class=\"wp-caption-text\">Bi-Folding Window - 3D Display (Fine)<\/p><\/div>\n<div id=\"attachment_297\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Plan-Symbols.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-297\" class=\"size-full wp-image-297 \" title=\"BiFolding-Plan Symbols\" src=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Plan-Symbols.jpg\" alt=\"\" width=\"600\" height=\"80\" srcset=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Plan-Symbols.jpg 1734w, https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Plan-Symbols-300x39.jpg 300w, https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Plan-Symbols-1024x136.jpg 1024w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-297\" class=\"wp-caption-text\">Bi-Folding Window - Plan Display<\/p><\/div>\n<div id=\"attachment_298\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Elevation.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-298\" class=\"size-full wp-image-298 \" title=\"BiFolding-Elevation\" src=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Elevation.jpg\" alt=\"\" width=\"600\" height=\"111\" srcset=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Elevation.jpg 1735w, https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Elevation-300x55.jpg 300w, https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Elevation-1024x190.jpg 1024w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-298\" class=\"wp-caption-text\">Bi-Folding Window - Elevation<\/p><\/div>\n<p>In usual fashion I wanted to push Revit beyond its limits. \u00a0This is all pretty easy if I simply ignore the hinges as every panel is basically the same. \u00a0So of course I want to see the various types of hinges at Fine detail. \u00a0So depending on where the panel sits in the configuration, it will effect what type of hinges it has either side. \u00a0Enter, some complicated conditional statements.<\/p>\n<p style=\"text-align: center;\">\n<div id=\"attachment_299\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Hinges.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-299\" class=\"size-full wp-image-299 \" title=\"BiFolding-Hinges\" src=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Hinges.jpg\" alt=\"\" width=\"600\" height=\"259\" srcset=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Hinges.jpg 1441w, https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Hinges-300x129.jpg 300w, https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Hinges-1024x442.jpg 1024w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-299\" class=\"wp-caption-text\">Bi-Folding Window - Hinges<\/p><\/div>\n<p>So first step was to create the Panel as a nested Family. \u00a0I then modelled up all the hinge options for both the left and right hand side of the panel and connected each option to its own Visibility parameter. \u00a0I wanted each option to be mutually exclusive, as I didn&#8217;t want to see 2 hinge types on the same side at the same time. \u00a0So I connected these visibility parameters conditionally to an Integer parameter (which I&#8217;ve explained in previous posts).<\/p>\n<p>With this family created I nest it into the host family, and connect up the Left &amp; Right Hinge Condition parameter to a matching parameter in the host. \u00a0Now the tricky part, figuring out the formulas&#8230; \u00a0If this was software programming it would be a pretty simple task. \u00a0But breaking it down to simple conditional statements makes it trickier. \u00a0Enter my go to tool, for formulas Notepad++, as it helps you get the brackets correct and I can space things out nicely on new lines.<\/p>\n<p>I established there were 7 potential configurations for each side of the panel:<\/p>\n<ol>\n<li>Left Stacking\/Visible\/Last<\/li>\n<li>Left Stacking\/Visible\/Mid<\/li>\n<li>Right Stacking\/Visible\/First<\/li>\n<li>Right Stacking\/Visible\/Mid\/Even<\/li>\n<li>Right Stacking\/Visible\/Mid\/Odd<\/li>\n<li>Right Stacking\/Visible\/Last\/Even<\/li>\n<li>Right Stacking\/Visible\/Last\/Odd<\/li>\n<\/ol>\n<p>So how do I translate these into Revit formulas. \u00a0Lets analyse Panel 3 from the left (NOTE: I used validation parameters to make sure what the user inputs for Panel Counts is within the accepted range).<\/p>\n<p><strong>Condition 1<\/strong> =\u00a0if(Panel Left Stacking Validation=3)<\/p>\n<p>Naturally for Panel 3 to be the last panel in the stack, then the left stacking parameter needs to equal 3.<\/p>\n<p><strong>Condition 2<\/strong> =\u00a0if(Panel Left Stacking Validation&gt;3)<\/p>\n<p>Likewise, for Panel 3 to be a mid panel, left stacking must be greater than 3.<\/p>\n<p><strong>Condition 3<\/strong> =\u00a0if(and(Panel Count Validation=3,Panel Left Stacking Validation=2))<\/p>\n<p>For Panel 3 to be the first right stacking panel (closest to the right frame). \u00a0The only way this can occur is if there are 3 panels in total and 2 of them are stacking left.<\/p>\n<p><strong>Condition 4<\/strong> (5-7 similar) =\u00a0if(and(Panel3, Panel Left Stacking Validation&lt;2,(roundup((Panel Count Validation-2)\/2)=rounddown((Panel Count Validation-2)\/2))))<\/p>\n<p>Now we are getting more complicated. \u00a0So obviously Panel 3 needs to be visible, only 2 panels or less can be left stacking, otherwise this would be in the left stacking bunch. \u00a0The next part calculates whether this is an even or odd panel. \u00a0By taking the total panel count and subtracting one less than the position of this panel, I know what number panel I have from the right. \u00a0EG: if there were 7 panels, subtract 2, I know this is the 5th panel from the right.<\/p>\n<p>So now I need to figure odd, is this number odd or even? \u00a0This is where roundup\/rounddown comes in handy. \u00a0In this example if I divide the number by 2, I&#8217;d get 2.5, so we simply do one formula that rounds up and one that rounds this number down, if they don&#8217;t match then we know that it&#8217;s an odd number panel. \u00a0If they do match, we know its even. \u00a0EG: 4\/2 = 2 (its already round, so the rounding parameters will have no effect).<\/p>\n<p>Bundle that all into one formula and there you have it. \u00a0Easy right!<\/p>\n<p>Enter Revit frustratingness! \u00a0I had some parameters controlling each panels offset from the side. \u00a0It seems that when these visibility parameters for the hinges were hooked up, all sorts of weird anomalies\/bugs with the position constraints surfaced:<\/p>\n<div id=\"attachment_300\" style=\"width: 541px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Broken.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-300\" class=\"size-full wp-image-300\" title=\"BiFolding-Broken\" src=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Broken.jpg\" alt=\"\" width=\"531\" height=\"488\" srcset=\"https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Broken.jpg 531w, https:\/\/www.xrev.com.au\/news\/wp-content\/uploads\/2015\/03\/BiFolding-Broken-300x275.jpg 300w\" sizes=\"auto, (max-width: 531px) 100vw, 531px\" \/><\/a><p id=\"caption-attachment-300\" class=\"wp-caption-text\">Why you do this?!<\/p><\/div>\n<p>Enter 5 hours of me trying to find a workaround\/solution for this stupid bug! \u00a0Ultimately the solution that worked for me (and this is very much a bug in Revit), was to not have the panels move in the host family. \u00a0I added the position offset parameter inside the nested family and hooked things up. \u00a0Then the constraints seemed to work again. \u00a0This was so frustrating when you think you&#8217;ve finished!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Did you ever want to create that single Bi-Folding window or door that could handle every possible configuration? \u00a0Well the other day I did&#8230; What is every possible configuration? Obviously Height\/Width Control Obviously Position within the Wall Obviously Number of &hellip; <a href=\"https:\/\/www.xrev.com.au\/news\/family-creation-bi-folding-windows-or-doors\/\">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":[25],"tags":[21,38,26,9],"class_list":["post-295","post","type-post","status-publish","format-standard","hentry","category-family-creation","tag-content-creation","tag-family-creation","tag-formulas","tag-revit"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.xrev.com.au\/news\/wp-json\/wp\/v2\/posts\/295","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=295"}],"version-history":[{"count":0,"href":"https:\/\/www.xrev.com.au\/news\/wp-json\/wp\/v2\/posts\/295\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xrev.com.au\/news\/wp-json\/wp\/v2\/media?parent=295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xrev.com.au\/news\/wp-json\/wp\/v2\/categories?post=295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xrev.com.au\/news\/wp-json\/wp\/v2\/tags?post=295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}