[MUSIC] In this session, we are going to build a Revit family for U-shaped gutters. A U-shaped gutter can be decomposed into three parts: ditch cover, drainage channel, and ditch bottom. Every part can be represented by a swiped plane element with different head and tail depths. Among them, the shape of the drainage channel is the most complicated one. So we build a U-shaped profile first, then use it to create the drainage channel. We need to create two U-shaped profiles for the head and the tail of the drainage channel respectively. Let us use the head profile as an example. First, create a U-shaped profile, then define the corresponding parameters of the drainage channel profile. Create a new family and choose the metric profile, that RTF file as the template. Under the Create tab, find the Detail panel. Click on the line. Draw that straight part of the profile, and then click the tangent and arc. Draw the inner semicircle and lock the two ends on the straight line. Up to this point, we have completed the U-shaped profile. Next, let us define the corresponding parameters. Because the metric profile template does not have any predefined parameters, we need to create all the parameters needed for the drainage channel profile and bind these parameters with the profile lines. The operations associated with reference planes, parameters, and equal division had been introduced in detail in the earlier session for Window family creation. We will just quickly go through them here. The first step is to define reference planes. In this case, we need to add two reference planes. One is the inner depths and the other is the outer depths. Click on the Reference Plane tool and add two new reference planes below reference plane center from slash back in parentheses. Then use the Align tool to align the endpoints of the lines with the reference planes. Click on the Reference Planes first, then click on the endpoint of the line and lock them. Next, let us define parameters. The first one is the inner width. Open the Family Types window to create new parameters. In the Parameter Properties window, select the Family parameter, name the parameter W. Common is selected for the discipline, lens for the type of parameters, and dimensions for the group parameters. Select Type so that this parameter can be widely used in this kind of element. Click "Okay" to complete the parameter setting task. Let me quickly demonstrate the definition of the parameters for representing the thickness of the drainage channel wall. For the rest part, please follow the demonstration to finish all settings. The next step is to connect these parameters with the reference plane or Y for controlling the profile. Use the Align Dimension tool to label the distance between the two lines inside the profile. Then use the Align Dimension tool again to select the two lines and the reference plane, center, left, and right. Return to the selection more. Click the label you just created and click "Equal" next to the number. Then click on the label and bind a tool parameter W. Please follow the video to finish the binding for other parameters. Now we can change the parameters of the profile to test whether they are working correctly and save the profile as Head Drainage Channel Profile. Follow the same to create the Tail Drainage Channel Profile. That is the same as the head U-shaped profile. After completing the two U-shaped profiles, we can build the 3D model of the U-shaped gutter. Because the gutter can be modeled as one profile extruded into another along a line, we choose Metric Generic Model Line based.rft as the family template. Next, we will build a drainage channel. Let us use the swipe blend tool to create a drainage channel. The tool sweeps from a type profile to a tail profile along a specific straight line to create a 3D model. Under the Create tab, find a Forms panel. Click on the "Swept Blend" tool, Click the "Pick Path" to set the path to sweep the profile, click the "Preset reference line" and click "Okay". Then click "Load Profile" to load both the Head Drainage Channel Profile and the N drainage channel profile. After loading is done, click the "Select Profile 1" to choose the head profile from the drop-down menu. Then click the "Select Profile" tool to choose the tail profile. Click "Okay" to compete Swept Blend. Open the 3D view to see the created U-shaped part of the drainage channel. Next, let us create a part of the ditch bottom. The ditch bottom is a bold under the drainage channel with different highs at the head and tail. We also use Swept Blend to make it. Because the profile of the ditch bottom is a simple rectangle, we just draw it directly. After finishing the ditch bottom we'll then create the part of the ditch cover, when g is a horizontal play covering the drainage channel. Because the shape of the head and tail profile is not different but a simple rectangle, we use sweep to create it. After the pitch cover, drainage channel, and ditch bottom are completed the appearance of the U-shaped gutter is roughly completed. Open the parameter window and you can see that the Metric Generic Model Line base template has a preset constraint parameter named lens, which is used to control the total length of the gutter. We need to create a profile parameters of the U-shape gutter, such as width, depths, etc, and connect these parameters with the model. First, let us set the inner width. Open the Family Types window to create new parameters. In the perimeter properties window, select Family Perimeter. For convenience, let us name the parameter as W. The discipline is common. Because W is a lens value, the type of parameter is lens. The group parameter is under dimensions. Our parameter would only affect the instance being edited, so select "Instance." Next, click "Okay" to complete a parameter setting of W. Following the same operation shown previously, complete the remaining parameters for the U-shaped gutter, except dunkyl. Because the settings of dunkyl are slightly different from others, I will quickly demonstrate how to set the parameters. After finishing the setting of all the parameters, we need to add formulas to the parameters. The parameters of the U-shaped gutter affect each other and have certain specifications. To make it easier for users to manage formulas are used to define the relationship between the parameters. In this way, any changes to one of the parameters will make other parameters adjust automatically for a gutter to meet the required specifications. In this example, we have created a parameter W, along with the input value of W denoted as W input. The user only needs to input the required size for W input. All parameters, including W, will be automatically adjusted accordingly. In the following, let us also use W for a demonstration and enter the formula for W. This formula contains if statements. It can be translated as when the input value of W is less than 300 millimeter, W is set to be equal to 300 millimeter. Whenever input value of W is greater than 600 millimeter, W is said to be equal to 600 millimeter. When both previous if statements are not true, W is set to its input value. Now, I will let you follow the same as demonstrated to complete the remaining parameter formulas. After completing the setting of all the perimeter formulas, the next step is to find these parameters with the model components. First, we set a part that belongs to the ditch cover. The parameters that belong to the ditch cover are B and H prime. Switch to elevation, left view, click the ditch cover. Click "Edit sweep" under the Modified Sweep tab to enter the Editing mode. Click the rectangular outline. Click "Edit Profile". Use the Align Dimension tool to mark the two lines inside the profile and the reference plane center, front-back, written to the Selection Mode, click label just created and click "Equal" next to the number. Then draw the length and width of the rectangle. Click the lengths label and set parameter B. Click the width label and set parameter H prime. After setting the parameters, click "Okay" to finish editing the sweep. The parameters belong into the ditch bottoms or B plus 20, T_1 and T_2. The setup method is similar to that of the ditch cover. Just know that the front and the back size needs to be set separately. Please follow the demonstration to set the other parameters. The parameter setting for the drainage channel part is quite different because we have already established the parameters for the profile we use, we don't need to use the Align Dimension tool to mark the label. Instead, we can just find it in imported profile parameters to the local parameters. Find the imported profile in the families of the project browser, then double-click to open the Type Property window. In the Dimension bar you can see the parameters we have created in the profile. Click the link on the right side of the perimeter. Assign the local parameter with the same name as the parameters to it. Then click "Okay". Now, whenever the local parameter changes, the profile also changes accordingly. Now follow the same as demonstrated. Complete all the parameters of the two contours. After completing all steps, a basic U-shaped gutter is created. We can load it into a project for testing, create a new project, and place the U-shaped gutter we just created. Change the W parameter and confirm that the U-shaped gutter can be changed normally according to our needs to complete the U-shaped gutter test.