# Random curtain panel change

**URL:** <https://forum.dynamobim.com/t/random-curtain-panel-change/4212>\
**Category:** Uncategorized\
**Tags:** revit\
**Created:** [May 26, 2016, 11:51pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212 "2016-05-26T23:51:59Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![solidio](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@solidio](https://forum.dynamobim.com/u/solidio)\
**Post date:** [May 26, 2016, 11:51pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/1 "2016-05-26T23:51:59Z")

</div>

Hey there, i’m a grasshopper user who is pretty new to dynamo. I wanted to ask is it possible to change the panels randomly on selected curtain walls so I could get darker panels on some cells. I have made a voronoi shape and populated it with panels from an imported mass of the cell surfaces. Each cell is a separate wall with one panel. Help as fast as possible, need to turn it in on monday ☹

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/5/594d7239f47d93108172e914db219a7b077273ab.png)

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [May 27, 2016, 3:34pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/2 "2016-05-27T15:34:16Z")

</div>

Are the panels regular curtain wall panels? Or do they have a material instance parameter?

---

<div class="post-metadata">

**Author:** ![solidio](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@solidio](https://forum.dynamobim.com/u/solidio)\
**Post date:** [May 27, 2016, 4:26pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/3 "2016-05-27T16:26:02Z")

</div>

they are regular schuheco curtain wall panels and plus they have a material parameter

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/3/34754d6bb327426c3ae588e8ef95bd9c6601222c.png)

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [May 27, 2016, 4:26pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/4 "2016-05-27T16:26:47Z")

</div>

It’s a type parameter currently so are you going to have a “type” for each different material? @solidio

---

<div class="post-metadata">

**Author:** ![solidio](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@solidio](https://forum.dynamobim.com/u/solidio)\
**Post date:** [May 27, 2016, 4:29pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/5 "2016-05-27T16:29:09Z")

</div>

well yeah kinda, i’m going to make some duplicate panels that would be darker, more/less reflective and such to suit my taste. I need the help of dynamo to evade the manual work of clicking through and changing all of these remaining panels.

---

<div class="post-metadata">

**Author:** ![solidio](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@solidio](https://forum.dynamobim.com/u/solidio)\
**Post date:** [May 27, 2016, 4:31pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/6 "2016-05-27T16:31:33Z")

</div>

plus i bet I could do something like change only 50% of the total amount of panels, or not?

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [May 27, 2016, 4:48pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/7 "2016-05-27T16:48:50Z")

</div>

@solidio last question is this a curtain wall or curtain system?

It looks like you want to:

1. Need to duplicate panels X number of times to allow for different shades.
2. Assign a material to each duplicate panel
3. Grab a random number of panels and set to a randomly selected new panel.

---

<div class="post-metadata">

**Author:** ![solidio](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@solidio](https://forum.dynamobim.com/u/solidio)\
**Post date:** [May 27, 2016, 5:13pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/8 "2016-05-27T17:13:58Z")

</div>

each cell is a separate curtain wall element (one wall is one panel -\> 1 cell).

My logic (if possible) was to select all of them and then change their type (to duplicate material panels) according to some random sequence of numbers (or boolean t/f values) which would represent how much % of the cells would be changed.

Now the hard part for me is translating that into dynamo script.

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [May 27, 2016, 5:43pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/9 "2016-05-27T17:43:14Z")

</div>

Well, for my example I’m using a simplified version but the concepts still apply.

Here’s the graph

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/9/95da0b3b75ed2532de8cf951225a4e6f7c42d87f.png)

And here it is in action

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/d/df2f14a0b17e2d4a7f90122977c17b1dc02242b4.gif)

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [May 27, 2016, 5:44pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/10 "2016-05-27T17:44:06Z")

</div>

And the graph  
[randomPanelsWithDuplicate.dyn](https://forum.dynamobim.com/uploads/short-url/yoUWZhanG7DaHzbKcAfA3ziBIS7.dyn) (28.4 KB)

---

<div class="post-metadata">

**Author:** ![solidio](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@solidio](https://forum.dynamobim.com/u/solidio)\
**Post date:** [May 27, 2016, 6:07pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/11 "2016-05-27T18:07:40Z")

</div>

thanks a lot @john_pierson. Will test it out shortly and keep you posted with the results 😃

---

<div class="post-metadata">

**Author:** ![solidio](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@solidio](https://forum.dynamobim.com/u/solidio)\
**Post date:** [May 27, 2016, 9:54pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/12 "2016-05-27T21:54:00Z")

</div>

ok that works fine, but I get some really wacky results because as I can see you have set the randomization to all the materials from my library/project. How could that be controlled to materials which I can choose?

---

<div class="post-metadata">

**Author:** ![solidio](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@solidio](https://forum.dynamobim.com/u/solidio)\
**Post date:** [May 27, 2016, 10:21pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/13 "2016-05-27T22:21:52Z")

</div>

I got It i just changed the material of the doubles produced by dynamo, getting sleepy, brain not working ☹

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [May 28, 2016, 2:44am UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/14 "2016-05-28T02:44:47Z")

</div>

Yes, I wasn’t sure which materials you would use. But you basically needed to create a list of the specific materials and duplicate the panel the same amount of times. It definitely needed some modification, but hopefully it put you on the right track.

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [February 27, 2019, 2:32pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/15 "2019-02-27T14:32:11Z")

</div>

3 posts were split to a new topic: [Setting Family Type of Element](https://forum.dynamobim.com/t/setting-family-type-of-element/32718)

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [February 25, 2019, 5:52pm UTC](https://forum.dynamobim.com/t/random-curtain-panel-change/4212/19 "2019-02-25T17:52:03Z")

</div>


