spacer.png, 0 kB

Sponsored Links

Members' Zone






Lost Password?

spacer.png, 0 kB
spacer.png, 0 kB
Home arrow Articles arrow Custom Model Components: Part 06(B): Parameter Power!
Custom Model Components: Part 06(B): Parameter Power! PDF Print E-mail
Monday, 26 November 2007
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.

 

In part A of this look at Parameters, we created a very simple custom component, which we then loaded into a Revit Project. Now we’re going to edit the Family that we previously created in order to add some Parameters to it

 

So first of all select one of the instances of our component….

 

Image

 

and then select “Edit Family” from the Options Bar…..

 

Image

  

Click OK to the prompt asking if you wish to “Open Small Table for Editing”. Revit now takes us back into the Family Editor where we can edit our custom component.

 

Switch back to a plan view of our component by double-clicking the “Ref. Level” view..

 

Image

  

Before we go any further, let me explain what (exactly) we are going to do. We are going to add two parameters to our component. We are going to call the 2 parameters “Length” and “Width”. We are going to use these parameters to control the dimensions of our table, in plan.

 

In order to control our table size in plan, we need to be able to adjust the plan profile of the extrusion. So first of all we need to edit the extrusion we previously created. Select the geometry itself, ie click on our box- once selected, the box will highlight in red…

 

Image

  

and then select “Edit” from the Options Bar….

 

Image

   

This now takes us back into Sketch Mode, where we first sketched out the profile for our extrusion. In order to control the dimensions of this sketch we need to first add dimensions that we can then add our parameters to.

 

So go ahead and add two dimensions like so…

 

Image

  

Now as they stand, these dimensions will have no effect on our component. They just confirm what we already know- that the profile for our extrusion is 1,000 x 1,000.

 

In order to “Control” these dimensions from within a Project, we need to add Parameters to each of the dimensions. Let’s do this now. Go ahead and select the bottom dimension. Make sure the dimension is selected- if it is, it will be highlighted in red….

 

Image

  

Once selected, take a look at the Options Bar. You will notice a drop-down box called “Label”….

 

Image

  

Click the black triangle to activate the drop-down menu. You will now see that you have the option to add a parameter to this dimension….

Image  

Go ahead and select “Add Parameter”. This will bring up the “Parameters Properties” control panel. You use this panel to tell Revit about the parameter you wish to define. Start off by naming the parameter- let’s call it “Length”….

 

Image

  

While we have the Parameter Properties control panel open, let’s take a look around the rest of the options available to us. At the top of the panel is the option for this parameter to be either a Family Parameter or a Shared Parameter….

 

Image

  

Family Parameters can only be accessed from within the Family in which they are created. Shared parameters are more powerful and allow us to share their data between families and also have it automatically populate schedules and tags. For our example, leave the Parameter Type set as “Family Parameter”

 

Moving back down to the bottom of the panel again, we see the following…

 

Image

  

We already know about “Name”- this is what we want to call our Parameter.

“Group Parameter under” allows us to select where our parameter will appear, when we access it via the Element Properties box- go ahead and change this to “Dimensions”.

 

The Instance and Type radio buttons allow us to specify whether this parameter is an Instance Parameter or Type Parameter. Let’s change it to an Instance Parameter- this will let us have a unique value for this parameter, for each instance of the component in the model.

 

“Type of Parameter” allows us to choose what type of parameter we want it to be. You will recall from part A of this article that there are many types of parameter- ie “Yes / No”, etc. In our example, “Type of Parameter” is already set to Length and is greyed out. This is because we are adding a parameter to a dimension- and dimensions can only accept parameters of the type “Length”. It wouldn’t make sense to add a “Yes / No” parameter to a dimension, would it?

 

Once you have made the changes listed above, go ahead and click OK. You will notice that Revit has added the name of the parameter to the dimension. It also displays the current value of the parameter- in this case 1000.

 

Image

  

Now you need to go through the above process again for the other dimension. This time name the dimension “Width”. Make sure you make all the other changes as before- ie select “Instance” as the parameter Type, etc.

 

Image

  

So there we have it. The profile that defines the plan of our extrusion is now controlled by two parameters that we have created. Go ahead and select Finish Sketch to create the extrusion. And what do you know? Our component does not look any different than it did before! Don’t worry- the difference will become evident when we work with our component from within a project. So let’s do that now.

 

Because we have modified our component in the Family Editor, we need to load the current (new) version into a project- this will automatically update all old versions of the component already in the project. So go ahead and select “Load into Projects”. Upon doing so, you will receive the following warning….

 

Image

  

This is just warning us that a version of this component is already in use in our project. Click OK to overwrite the old version.

 

Again, no visible difference to our components! Go ahead and select one of the components- and then select the Element Properties…..

 

Image

  

If you look at the Element Properties panel, you will see our two new parameters listed under “Dimensions” (because we chose to “Group under Dimensions”). Because we made them Instance Parameters, we can now change their values for each instance of the component within the model. So go ahead and test it out- change the values of our parameters for each of the 4 instances of the component…..

 

Image

  

So there we have it- our first custom parametric component! Very simple, I know- but we’ve covered some very important, fundamental concepts. The ability to create dynamic geometry than can be easily modified and reused is a very powerful aspect of Revit.

 

If you have any questions related to this article, please feel free to use this Forum.

 

 

Proceed to Part 7
Last Updated ( Monday, 01 February 2010 )
 
< Prev   Next >
spacer.png, 0 kB
spacer.png, 0 kB
spacer.png, 0 kB