Creating Type Parameter to DirectShape

Hello,

I am trying to create both an instance and type based parameters to some direct shapes in Revit from Grasshopper. When I try and do this with instance everything seems to work fine. I see the parameter and the value show up in the properties panel. When I switch the Add Parameter component from Instance to Type it no longer works. I see the error "Parameter ‘CODE2’ is not defined on ‘Element’.

What do I need to do to host the type based parameter on these items? Do I need to define this parameter first? How can I do this from GH, or does this originate in Revit?

Define Parameter Type & Instance.gh (14.9 KB)

Add a DirectShapeType, rather than geometry instance

I see the parameters writing in GH but on the properties in Revit they never populate. I would need them to host both the instance and type parameters in the same DirectShape items. Is this not the correct use of DirectShape Type? Can I plug this in straight from the AddDirectShape(geometry)?

if I plug it in like this it results null values

You’ll need to go into the Type to see the added values, you are seeing the properties of the Instance Geometry Direct Shape

My Rhino/Gh geometry is positioned in Rhino and pushed into Revit. I am not placing these items via locations and there is only one instance of each item. So I am not sure what to do with the location input. Also would the type parameter not be visible in the properties panel in Revit in the end? I need the to host both instance and type parameters at the same time.

To have access to a Revit Type Parameters you will need to place an instance of a Family. Direct Shape Geometry is not a Revit Family, They offer the DirectShapeType to provide some of the Family functionality in Direct Shapes.