Filter element by length type parameter

@r.chowdhary

There is a node in archi-lab.net that would allow you to perform this operation:

Couple of things about this node and how it works so that we are on the same page:

  • ElementType input is set to FamilyInstance. There is no Type called Doors or similar. All Doors are actually FamilyInstance under the hood. A lot of other elements in the model, are also Family Instances so this filter might be a little slower than other methods. Just so you know.
  • ParameterName is actually the name of the BuiltInParameter that in the UI is called Head Height:

image

Why did I use the BuiltInParameter? That’s because this method grabs the first element it finds that matches FamilyInstance Type and then attempts to get the requested parameter from it. Since the FamilyInstance type contains other elements, not just Doors, its possible that it returns a piece of Furniture for example, and it won’t have that parameter, and it will fail. BuiltInParameter is obtained a little differently, and should be a much more reliable method. I realize that this is not the best way, and I will make a note to improve that node in the future. This is how it works now.

  • Value is being converted to internal units. That’s because all parameter values are actually stored in Decimal Feet under the hood (length is). That means that on the screen we see 2100mm but under the hood Revit stores 6.88976377952756 ft. That’s normal. That’s how Revit works. Just make sure that if your display units are different than ft. to always convert to ft.

Hope this helps.

All nodes used for this example can be found in archi-lab.net package.

Cheers!

3 Likes