From the course: Revit: Creating C# Plugins

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Parameter values

Parameter values

From the course: Revit: Creating C# Plugins

Start my 1-month free trial

Parameter values

- [Instructor] We now know how to get parameter information such as its name, unit type, and built-in parameter. Using what we know, let's now have a look at getting and setting parameter values. I currently have the Visual Studio exercise file open for this video. In here, I've created a new command called SetParameter. This is similar to the GetParameter command; however, I've removed the area where we got the parameter and I've added in a using statement to set a parameter. First, let's get the parameter using its built-in parameter. Retrieving parameters this way is much more stable as parameters won't contain two of the same built-in parameter, which can sometimes happen with the Lookup method. So let's create a new parameter variable called param and we'll assign to this a call from the element class to get_Parameter, using the built-in parameter INSTANCE_HEAD_HEIGHT. You might be wondering why we had to prefix the property with get. This is because it is called an index…

Contents