FamilyInstance.SetRotation Double Problem


I am attempting to create a Dynamo script that obtains location and orientation information from Generic Model families in my model in order to place electrical fixtures in those same positions and orientations. So far, I’ve been successful in obtaining both location and orientation information from the Generic Model families as well as placing electrical fixtures at those locations. However, I’ve found myself stuck when trying to rotate the newly placed electrical fixture families by a rotational value given to me when calculating the angle difference between the families current orientation and its desired orientation.

I believe the issue rests in the FamilyInstance.SetRotation node and its ‘double’ input. I have tried several different ways of rotating a list of three electrical fixture families by three rotational values (0, 90, and 180 degrees), but in all my attempts it has bogged my computer down either crashed Revit or worked after several minutes. I don’t believe what I’m doing should require such processing power.

In one scenario I fed a single number of 90 into the double input and it worked quickly. So now I’m curious if I really need a double value or an integer. However, when I tried converting my list of angles to a list of integers the same problem occurred.

Can anyone think of what might be causing me trouble?

I should note that in the snippet above nothing is actually plugged into the double input of the FamilyInstance.SetRotation node. I have tried each of the nodes present that could go into the double node. Just trying to illustrate the things I’ve attempted.

Have you tried manual mode? The rotation of the instances might cause the graph to re-run and then cause another rotatation and so on in an endless loop.

Wow, so simple! This worked wonderfully. Thanks so much, @Einar_Raknes.