Hi,
I want to start by mentioning I am complete newbie to Dynamo and coding so I know the issue that I am running into is based on my limitations but I am hoping for some help while I learn.
What I am trying to figure out how to get an adaptive panel to randomize the material. I watched several video tutorials on how to get a elements and curtain wall panels to randomize the material and I was able to get that to work but when I try to apply a similar script to the adaptive component, I get a read only error that I can not get past. I did read that it was possible to write a python script to get past the read only message but I do not know python.
This is what I am hoping to create
The first pass that I tried was to modify the basic Revit adaptive checkboard family so it has the material set as an instance parameter but that doesn’t work. I then tried to change the material parameter to a type parameter thinking that I could randomize the adaptive panel types but also didn’t work.
Here are the three Revit 2022 files that I have setup. One has the curtain wall panel and the adaptive component material parameter set as an instance. The other has the material parameter as a type parameter so there are different types for each of the materials.
curtain wall test.rvt (1.8 MB)
divided surface.rvt (1.6 MB)
divided surface_instance parmater.rvt (1.6 MB)
Here is all the different scripts that I have tried but each one has a different issue. I just need one to work.
This is the curtain wall panel script that works with an instance material parameter. It works with the curtain wall test file.
1.0 Shuffle Curtain Panel Material_Manual.dyn (21.2 KB)
These two scripts are typing to change the material parameter which is an instance parameter
3.0 Randomize Divided Surface_Material_Manual.dyn (23.4 KB)
3.2 Randomize Divided Surface_Material_Manual.dyn (25.1 KB)
These two scripts are typing to change the panel type parameter
3.3 Randomize Divided Surface_Material_Manual.dyn (23.9 KB)
3.4 Randomize Divided Surface_Material_Manual.dyn (20.1 KB)
any help would be greatly appreciated.
Thanks,
Ken Marcus