Vous êtes sur la page 1sur 1

Once you have selected elements or family types, you can extract specific parameter values from

them. With element instances selected, you can extract instance parameters. With a family type
selected, you can extract type parameters. In this exercise, all of the windows belonging to a window
type have been selected in the All Elements of Family Type node. The window type is selected in the
Family Types node. Additionally, a single window has been selected in the Select Model Element
node. To extract a parameter, you need an Element.GetParameterValueByName node. In the node
Library, expand Revit > Elements > Element. Next, click GetParameterValueByName to place the
node in the workspace.The Element.GetParameterValueByName node has two inputs: element and
parameterName. The element input has some flexibility. For example, you can input a single
element instance or multiple instances, and then extract an instance parameter. Or, you can input a
loadable family type and extract a type parameter. Take a look at each scenario. To extract an
instance parameter, you can use the output of a node that has an element instance or instances
selected. Connect the Elements output of the All Elements of Family Type node to the element
input. Next, to specify the parameterName input, you need a String node or a Code Block. In the
node Library, search "string" and then click String in the list to add the node to the canvas. Connect
the output of the String node to the parameterName input. Once you do, you can enter an instance
parameter name in the String node to extract that parameter. For example, enter "Sill Height" into
the String node. When the drop-down in the Execution Bar is set to Automatic, you can simply click
in the canvas after you enter the text in order to run the graph. To see the parameters that have
been extracted, pin the output of the GetParameterValueByName node. Since the input was a list of
windows, the output is a list of instance parameters in this case, the Sill Height parameter. Now
you have a list of the sill heights for each window of the specified window type in the current Revit
project.You can also change the parameter in the String node. For example, enter "Head Height"
and then click in the canvas. Now the list contains the Head Height instance parameter for each
window of the window type listed in the Family Types node. In order to extract an instance
parameter from a single element, you can connect the Element output from the Select Model
Element node to the element input on the get parameter node. The Select Model Element node has
a single window selected, so the output is the Head Height value for that window instance. Finally,
you can use the GetParameterValueByName node to extract a type parameter. In order to extract a
type parameter, you must input a family type. You can connect the Family Type output from the
Family Types node to the element input, even though they do not seem to match. After you do, you
need to enter a type parameter name in the String node. For this example, enter "Width" to extract
the Width type property value. Keep in mind that the GetParameterValueByName node is very
flexible and allows you to extract instance or type parameters.

Vous aimerez peut-être aussi