random glass color in Revit using Dynamo

random glass color in Revit using Dynamo

Anonymous
Not applicable
904 Views
4 Replies
Message 1 of 5

random glass color in Revit using Dynamo

Anonymous
Not applicable

Hi,

attaching a screenshot.

I received a dyn script from somebody for randomizing glass color, tried using it in my project and it wouldn't work. I'm new to Dynamo, first script. I think it has to do with the parameter name (Element.SetParameterByName)- the code block attached to the paramter name. What exactly do i need to fill for a parameter name?

Once this is fixed, is there a way to f.e to have 60% of one color 20% of another and so on?

0 Likes
905 Views
4 Replies
Replies (4)
Message 2 of 5

barthbradley
Consultant
Consultant

Did you abandon your other thread? Can I squat on it?  

Message 3 of 5

gsucci
Collaborator
Collaborator

Hi,

 

when I did this I used to randomize the curtain panel types.  So, instead of materials, you would random shuffle panel types (each type has a different material, of course).

 

In your script, please expands all data going through your nodes, and the error message you are getting, otherwise it's difficult to see what is going on.

 

On top of my head, I think you are trying to change the material of a curtain panel type, which is useless if you only have one type of panel on your model (all your glass will change at once, depending on the last material you assigned to the type).

 

Also, "Material" should be a type parameter, so I am not sure it will work if you feed it instance elements, as you are.

 

If Material was an instance parameter, then your approach would make more sense.

 

Regards

 

gio

Message 4 of 5

Anonymous
Not applicable

no, didn't abandon it but i hope they both get answered. here i got further a bit with an actualy dyn script. i'm still alive in both of them 🙂

@barthbradley 

0 Likes
Message 5 of 5

barthbradley
Consultant
Consultant

That's better. I approve.  That's the decent thing to do.