Hello I created this definition to bring in a rhino model element with direct shape and I created a material parameter to apply to the Direct Shape. I now notice, that not only does my direct shape have this material parameter but so does every other model element in my project. How do I apply this parameter to just my direct shape?
This is what my script looks like below and I also attached it.
Hi Olivia, DirectShapes are a little different and only take a material as a Paint, not parameter based. The Material Parameter you are adding to the Project wonāt be applied to the DirectShape Geometry.
Creating Families allows you to have Instance based material parameters.
Oh that is really interesting. Thank you for confirming this. So is there a way to create a family and import my geometry through that family so the imported rhino geometry can show up with that parameter? If so could you point me to a script on that? Many thanks.
Can you describe the workflow & desired outcomes a bit?
It looks like you are bringing a custom wall, if we do this with the family its going to require placement locations and manually associating the Instance Family Parameter to the geometry in the family.
Hello Japhy, I set this example up as a way to vet the issue. My actual project is a set of stairs that I would like to bring in. So as I understand I need to use an add family component and create a custom stair template for that component I can see how to do that here: (11) Create custom family templates in Revit using Rhino.Inside.Revit - YouTube
Is this correct? I am testing out some things now I have this laid out below
The Add Family seems to take issue with the Built in Category picker. Am I on the right track? I think I am suppose to use a āModel Category Pickerā for the Category input but I canāt find that component.
Once I get this setup can I apply a material parameter to this? If so how?
I see in examples on your resources you are using a āmodel category pickerā but I canāt find that exact picker and all other alternatives seem to not work. Right now its a generic model.
To setup and then create the association of family parameters via the Revit API is possible but has a lot of variables and needs to be done in the Family Document. Assigning the material (not as an associated family parameter) is easy in RiR, but adding a shared or family parameter and associating programmatically to particular breps in families is complex and not often requested.
Hello Japhy, thank you for this workflow. I have two more questions regarding this. I noticed that the script below that imported my geometry last week no longer pulls in my geometry into my Revit file. Shouldnāt this script below import my brep?
thank you Japhy, The error in the add Family component is ā1. The input category id cannot be assigned as the new category for this family.
Parameter name: categoryIdā This still shows up if I unplug the file template file so I donāt think that is the conflict.
this is a new file with a different template from the other day so in the mean time. I am going to try to recreate the same exact environment to see if this still happens.
Hello Japhy, I tried out this same script in other revit files and it seems to work. I am not sure why this one revit file is not accepting the geometry like the others.
So now I only have two challenges.
I am not sure how to properly set the family category
I am not sure where to place the element parameter in my script so it will show up in my property panel as I select the family. I am fine with this being an instance parameter. I recreated the element parameter similarly to how you showed it earlier.
Ok this solution makes a lot of sense. So initially my hope was that I could load a family into my main Revit file with its own parameter. It seems like to make the material parameter side of it work correctly though, the āAdd Parameterā component needs to run in an isolated Revit family session.
Hi Japhy,
Iām revisitng your method, which I actually would prefer to add a āMaterials and Finishesā Paramater as a Type Paramater, within the Identity Data of Rhino imported geometry into Revit.
Iām going to attach my grasshopper script draft.gh (16.1 KB)
, and would really appreciate you or anyone within the community to chime in! The sad thing is Iām getting an error for the Build-In Paramater node. See attached. image
Hi Japhy, perhaps my question didnāt make sense, but it looks like you may have already figured out how to solve this once before in your previous post ā and after trying to copy your method ā Iām missing something / or something is breaking.
What Iām trying to do is import a direct shape from rhino to revit, and assign a materials & finishes type paramater.
Iām able to import direct shapes with materials, but the method isnāt ideal. The direct shape component creates a new material that is somehow linked to your imported direct shape ā and you can only edit that material, rather than swapping out other materials within your Revit file.
Wondering if anyone knows how to import a direct shape from rhino to revit, and assign a materials & finishes type paramater.