Can not find family name of a curtain panel object

Hello, I am passing in a curtain panel element and I want to simply find out what its family name is.

I am trying to get this using the get of a built in parameter. This works if its a panel type but not an instance of the panel. The image attached shows this clearly.

Or… is there a node in rhino inside where I can easily find the built in parameter, the usual get parameter node doesnt seem t work.

Hi @ssw1,

You can extract the Type from the Element, and then extract the Family Name from the Type.

Or to extract the Family Name from the Element directly you should use a different parameter. BuiltInParameter.ELEM_FAMILY_PARAM is the one you are looking for. Then you also should use DB.Parameter.AsValueString to extract the string represenation of that parameter value.

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import BuiltInParameter

Family = Element.get_Parameter(BuiltInParameter.ELEM_FAMILY_PARAM).AsValueString();

This is also a good ocasion to use Grasshopper Clusters

And save it into the Grasshopper Ribbon.

@Kike this is fantastic! thankyou very much