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
- [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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Classifying elements5m 22s
-
(Locked)
Retrieving element information6m 39s
-
(Locked)
FilteredElementCollector3m 7s
-
(Locked)
Creating a collector7m 28s
-
(Locked)
Transactions2m 47s
-
(Locked)
Modifying elements5m 30s
-
(Locked)
Creating families7m 54s
-
(Locked)
Querying FilteredElementCollector5m 7s
-
(Locked)
Creating line-based elements6m 55s
-
(Locked)
Creating loop elements5m 59s
-
(Locked)
Get parameter6m 3s
-
(Locked)
Parameter values4m 45s
-
-
-
-
-