Greetings everyone!%C3%96SIKT-1|690x407
I have read everything that I could find on the topic of randomizing panels for curtain walls since it appeared the most similar to my situation. Unfortunately I am failing TERRIBLY at this seemingly simple script-pursuit.
Objective:
To randomize which of two adaptive panels that are placed on a UV-grid. Panel-A has an diagonal expression in Slanted upwards to the left, panel-B to the right.
Background:
I have about 16000 square meters of outdoor acoustic panels that are 1*1 meters large. The surface is slanted and continuosly curved both directions. On this surface I placed a fixed distance UV-grid with nodes in the intersections. Ontop of these nodes there is a repeated panel with four reference points that perfectly aligns itself to the grid on the ever changing host curvature.
Worth mentioning is that when I execute my script, it just says that it is running and freezes Dynamo. But It does not really freeze since I can shut it down with a prompt of “Do you want to save the changes to this script?”. No geometrical changes happen in the model from the script.
I’m a bit tied up with my AU handout and a presentation on Tuesday evening, but here is something to try:
On your model place the same panels placed throughout the curtain wall, gather all elements of that family type.
Shuffle the list of elements - random order achieved.
Use a List.Chop node to break the list into groups of 2 (or 3, 4, n).
Use a List.Transpose your N sublists of 2 (or 3, 4, n) so you have 2 (or 3, 4, n) sublists of N items.
Create a selection set from each group using a SelectionSet.ByElements node. You’ll need to generate a unique name for each, something like "panel type "+(1..n); should work.
In Revit, load the selection set and manually change the family type as desired.
You’re in a tough spot as you built your mass as an in place family. This means you’re not going to be able to easily edit the family via Dynamo as you have to start editing the in place families before you can do anything with them, which blocks Dynamo from running as there is an open transaction. @Michael_Kirschner2 any ideas how to get around this?