From the course: Revit and Dynamo for Interior Design

Add overrides to a view template

From the course: Revit and Dynamo for Interior Design

Start my 1-month free trial

Add overrides to a view template

- [Instructor] In this video, I'm going to show you how to use Dynamo to make graphic override view filters for each finished wall type with their graphic override settings to have the color matching the wall types and material color. Then I'll apply the same filters to a view template. Let's get started. When making a filter inside of Revit, you need to go to the visibility graphics menu. On the filters tab, you can click add and edit new, and the create button to create your filter. You have to name the filter and define rules for it. Those rules include picking a category. You need to create the filter rules where you filter by a parameter. You can select a parameter, have search criteria of whether it equals, doesn't equal, greater than or less than, and a value for what that equals. Then once you've created the filter, you need to add it to your view. Then you need to set the graphic overrides to add the filter to this view. In Dynamo it's not much different. You need to find the parameter that you're going to filter by, create the filter rule, name the filter and apply it to a category. You need to add the filter to a view, and set the visibility graphics overrides for that filter. Let's jump into Dynamo to look at this. On the manage tab, click on Dynamo from the visual programming panel. Click open, and browse through the 03-06 begin filters exercise file. Make sure to open it in manual execution mode and click open. This workspace was set up to create the wall types legend that we used in the previous video. I'm going to delete the portion that was used for the wall type legend, and leave the section that we used to create the material color overrides. I can delete out the extra nodes and the selection nodes for selecting the legend components. Now I can start making my view filters by finding the parameter that I'm going to filter by. In the search bar, I can search for parameter by name and click to add the parameter by name node. This node looks for an element, which is the type of item that has a parameter and a name of the parameter that we want to get. I'm going to search for wall types and use the wall type selection node to pick the finished wall's wall type. I can wire the wall type output to the element input of parameter value by name, and then double-click to create a code block. In quotes I can type "type name." When I click out, I can select the output of the code block and wire it to the name input of parameter by name. If I click run, you'll see that I've gotten the type name parameter. Now I need to create my filter rule. In the search bar, I can search for filter rules by rule type and click to select the by rule type node. This looks for a parameter, a value that it's looking for and a rule type. The rule type, if I search rule type, I can find a select rule type node in the library. From the drop-down, I can select equals and wire the rule type output to the type input on the filter by rule type. Now for the value, I want to look for the name of our finished wall types. If I pan back to the rest of our existing workspace, I can take the string output from element name and wire that to the value input of filter by rule type. If I set my lacing to longest, I should make a rule type for each one of the values in this list. If I click run, I have a list of six rule types. Now I need to make and name my filter. If I search for filter element by rules, I can use the filter rule that I just created. I can name it and add a category of what we want to look for. I can wire the filter rule output of the filter rule node to the rules input of the parameter filter by rules node. Now for a category, I can search for Revit categories, and use the category selection node to click the drop-down list and search for walls. I'm going to wire the category output to the categories input of our filter by rules node. For the name, I'm going to use the element name of the wall types. If I pan back to our element name node, I can take the string output and wire that to the name input of our filter by rules node. If I click run, you'll see that I have six filter elements that I've created. Now I need to add each of these filters to a view. In the search bar, I can search for view.add filter, and click to add the node to our workspace. This node looks for a view and a parameter filter. I can wire the parameter filter element output from the filter by rules node to the parameter filter input on the view.add filter node. Now I need to find a view. I'd want this to work with the active view that I'm working in. If I search for current doc, I can find a node that provides me the current Revit document that I'm working in. If I search for active view, there's a node that says active view. This node requires a current document and will provide me the active view of the current document that I'm working in if I select the view output node from the document.active view node, and wire it to the view input node of the view add filter node. Now if I click run, you'll see that I've added six view filters to this view. If I go into Revit and go to the visibility graphics menu, on the filters tab you can see that I've added the filters to this view. If I click edit new, I can look at the filters criteria that I've created. Here you can see that I've added multiple wall types to each filter. I'm having an issue with my lacing. If I hit cancel, I can go back into Dynamo and look at all the nodes that I've worked with. Each of the nodes is working with a list of multiple items. I need to make sure to set lacing to longest on all the nodes. The filter element by rules node, if I right click and set lacing to longest, now I can hit run and if I go back to the visibility graphics menu, and look at the filters tab, now I can see that I only have one family type per filter that I've created. Now I need to set the visibility graphics of each of these filters. If I search for view.set filter overrides, I can use the set filter overrides node to set filter overrides to any filter that's on a specific view. I'm going to wire the view output from our view add filter node to the view input of the view set filter overrides node. I can take the parameter filter element from my filter element by rules node and wire that to the parameter filter element input on the view set filter override. What this is looking for is the view that we're working in, the filter that we've created, and the overrides that we want to set with it. If I pan back to the overrides that we've created based on the material color, I can wire the overrides output of the overrides properties node to the overrides input on the view set filter overrides node. Now the final input is looking for a true or false on whether something's hidden. That true or false refers to the checkbox on whether something's visible on the filters. Because I want all these wall types to be visible, and only overridden graphically by their color, I want to make sure that this is checked yes. Inside of Dynamo, if I search for a boolean, I can add a boolean to the workspace, and select true as its value, and wire the output to the hide input on the view set overrides graphics. Now if I click run, I should see the colors change in our floor plan. Right now the color is overriding the wall color adjacent to it. This is a little cluttered for me. I can fix this by setting these walls to be transparent. You'll see the black line of the architectural wall underneath with a highlighted line of the color of the paint finish going inside of our space. Inside of Dynamo, I can pan back and look at our graphic overrides by properties and the code block next to the semi-colon. Type enter on your keyboard, and type 100 and a semi-colon. You can wire the output next to the 100 to the transparency. That creates a graphic override of 100% transparent. Now when I click run, the walls in our view show through the colored walls inside of our plan. We can more clearly see the floor plan and graphically see where the colored finishes are applied. Taking this a little bit further, I may want to use a view template. If I run this with a view template on the view, it won't be able to add the filters. However, view templates inside of Dynamo are just views, so I can add all of the filters that I used to that view template. On the drop-down arrow on the undo button, I can undo all the way back to my first Dynamo script. This removes the filters from my view and now I can create a view template from this view. From the view tab under view templates, I can create template from current view. I'm going to name this Presentation Template. I'll click okay on the menu, and in the properties of my view, I'm going to add the view template. Going back to Dynamo, I'm going to freeze our view filters while I pull the view template from the properties of our view. Instead of using the active view current doc as the view I'm going to add the filters to, I'm going to find a parameter value of our active view. If I search for get parameter value by name, I can click and add the get parameter value by name node to our workspace. I'm going to wire the view output from document active view to the element input on get parameter value by name. I'll double-click on the canvas, and in quotes I'm going to type "view template." If I click out, I can wire the output to the input of parameter name, and the get parameter value by name node. If I click run, you can see the results show that the floor plan is a plan view with name of our presentation template. I can wire the output of this to the view of add filter. Now when I unfreeze our filters, I can click run and now the filters will be added to the parameter view, which can be used on multiple views in our file. If I go back to Revit, I can see that the view template is still applied to my view, and under the filter properties for it, I can see that a filter for each wall type has been added to the view template. If I create a sheet, I can add our different views to the sheet and now that I've used the material graphic override, I can create a cohesive presentation with similar graphics. We've just learned how to create view filters and apply them to our view. By applying the views to a view template, I can create a consistent look for a finished presentation where someone can clearly see where and what finishes are applied in our space. By using the material color, I can include rendered perspectives or isometric drawings while having images graphically coordinated.

Contents