Add.Direct.Shape.ByGeometry needs option to set material as a parameter instead of a Revit Material

Especially if you want to insert geometry into a family first, before importing into project, there is no way to set material as a parameter and the family will not share the project materials because it’s a family.
Additional usage I need is to change the category of a baked model without re-baking. Revit does not seem to play nice with direct shapes even if they will display correctly in views.

Hi,

Could you please elaborate a bit more what you are trying to achieve?

About changing the category, where would you like to change it from?
Are you talking about the DirectShape.ByGeometry, or from the Revit UI?

What do you mean when you said Revit does not seem to play nice with direct shapes?

Thanks,

Yesterday I had to open Rhino and Grasshopper over again so that I could re-bake something from the furniture category to casework. Normally, this would be an easy parameter to change on a Revit native geometry.
Then 2 hours later, someone wanted to change the material, so I had to open up Rhino and gh again to re-bake a new material, which is also usually an easy parameter to change if the family has a material parameter built in.
When I try to make a family from RhinoInside.Revit, I only have 6 default materials to choose from, so now since there is no material parameter in the family, it can’t be used easily for more than one project with a specific material.
What I’m saying about not playing nice, is that imports from RIR act like CAD imports where it is kind of like a statue and has no BIM data or parameters that can be changed which means currently RIR would be a poor choice for trying to build a family because it will never be able to have parameters.

I see, you are trying to author a Family.
Here Create Window Family with Opening you can see a sample on how to create a Window family.
As you can see in this sample there are components to assign subcategory, visibility and material to the content of the family, you can as well change the family category but to do so you need to modify this sample to use the GenericModel template.

Hope it helps.