Please Note: Our Discussion forums have moved. If you would like to discuss this article or any aspect of Revit, please do so at www.forums.revit.biz We will be more than pleased to help you with ANY Revit query. Welcome to sixth part in our series on creating custom components. In this particular article we are going to take a look at Parameters. Parameters are at the very heart of Revit. They are what make Revit so very powerful and flexible. Everywhere you look in Revit, you will see parameters at work…  Let’s take a section of wall. This wall is absolutely overflowing with parameters. If we look at it’s element properties, we can see…..  Each one of these settings is a parameter that we can change- either now or anytime in the future- and the effect on the wall will be made as soon as we confirm the change to the parameter. A very important thing to note is that parameters come in various “types”. An obvious type is length. For example, our wall has an Unconnected Height of 2000. The parameter “Unconnected Height” is a length parameter- if we were to enter the value “cherry pie” against Unconnected Height, Revit wouldn’t have a clue what we are trying to tell it- it is expecting a length here. But if we look at “Room Bounding”…..  We either have a choice of ticked or unticked. This is still a parameter but it is of the type “Yes / No”, “0/1”, etc. Likewise, if we look at the parameter “Top Constraint”…..  We can see that we have a choice from a pre-defined list. Now the good news is that when you create your own custom components, you can create your own parameters- that you can name as you wish; and also specify what type you wish them to be. So let’s go ahead and make a very simple component and then add a parameter that will allow us to modify the component within our project. For this exercise we are going to create a very simple 3D cube. From a new Revit Project file, select File>New>Family..  From the File Explorer window, select “Generic Model”, and then “Open”….  This gives us a very basic template upon which to build our simple component. Because we haven’t yet covered an explanation of the Family Editor (in which you are now in!) we will keep this example very simple- remember, all we are trying to demonstrate here is the use of your own parameters. Go ahead and select “Solid Form > Solid Extrusion”…  …upon which Revit will enter Sketch Mode, allowing you to sketch the plan profile of you extrusion. Use the line tools to draw a square 1000 x 1000….  So that’s the shape for the base of our extrusion. Now we need to define the height- ie how far we wish it to be extruded. Click on “Extrusion Properties”…  And change Extrusion End from 250 to 500, like so….  Click OK, and then select Finish Sketch, to tell Revit to go ahead and form the Extrusion…  Revit has now created a box that is 1,000 x 1,000 in plan and 500 tall. Switch to View 1 (under 3D Views) and use the eye tool to spin the box around so that you can see it in 3D…  And there we have it! Our very first custom component. Let’s save it somewhere, so that we can use it again in the future. Select File > Save As. Choose where to save the component and give it a name. I’m going to save mine to the Desktop and call it “Small Table”….  And there it is. So let’s go ahead and put this component into a Project. Going back to Revit, select “Load into Projects”…  Upon selecting this command, you will be taken from the Family Editor back into the Revit Project File that you previously had open (before we started creating a new Family). To use our new component, just select “Component” from the “Basics” Design Bar….  You should immediately see our new component on the end of the cursor, ready to be placed! Go ahead and place 4 instances…..  Switch to the default 3D View to see our 4 tables in all their wonderful simplistic glory!  So there we have it. We’ve created a very simple component that can be used in any Revit Project. But this article was about Parameters! And we haven’t created any parameters? Adding parameters to our component would give us a great deal of flexibility, in terms of what we can do with it from within a Project. As we know, our component has a base of 1,000 x 1,000 and a height of 500. But what if we wanted one of the instance to have a base of 200 x 750 and a height of 1,200? And another to have base of 100 x 2,000 and a height of 300? Well, we could create a new Family of each of the variations. But why would we want to do that when the underlying geometry of each variation is identical. Let’s just create some Parameters for the aspects that we wish to make flexible and then we can modify each instance to suit.
|