FamilyInstance.SetRotation

revit
dynamo
#1

Following up on a similar thread here


That thread is discussing using the FamilyInstance.ByPoint to initially place elements
@Kulkul wrote a work-around for that (thanks!)
Now I have a similar issue with FamilyInstance.SetRotation.
That node also binds to the elements the first time you run it, and then keeps that binding for subsequent runs.

0 Likes

#2

Can you post an example in what context are you using the the node?

0 Likes

#3

I’m writing a graph to lay out seating in an auditorium.
The graph is rather involved, but the gist of it is I pick a Line or Arc, calculate how many seats will fit along it’s length, and place a chair family at each location along the curve. Then I calculate the tangent at each point and rotate the family to match.
This image shows what I’ve got so far. Each line is a separate run of the graph (I’ll work on passing a lit later)
With Kulkul’s help, It’s working to place the individual family instances, but when I use FamilyInstance.SetRotation, it only rotates the families placed during the first run.

0 Likes

#4

Well this image and your explanation doesn’t tell anything about how do you use FamilyInstancet.SetRotation in your graph.
I am pretty sure that you can use the node for that purpose successfully, but without seeing what you’ve done till now I can’t really give any directions

0 Likes

#5

@DaveP You need to show us where did you got stuck it helps others who is trying to help you. Read this forum guidelines

0 Likes

#6

Sorry, I thought that my reference to the other thread was clear enough.
I didn’t want to re-type everything in that thread.
Also assumed my image was fairly self-explanatory, but I guess not.
So I guess I’ll recreated the other thread here:

I used the FamilyInstance.Bypoint node to place all of those chairs along the lines.
That didn’t work properly. If I select one Line and place the families, it works fine.
But the second time I run the graph, it deletes the first set of families and places the same family (same Element ID) along the second path. A third run removes the second set and places them along the third path. Again - same Element IDs. The reason this happens is explained in the first thread.It is “by design”

KulKul rewrote the FamilyInstance.Bypoint node (again, in the first thread) so you can use it more than once.
Once that was working, I added nodes to examine the curve and find the Tangent and each insertion location and used the FamilyInstance.SetRotation node to rotate each family accordingly.
The FamilyInstance.SetRotataion node exhibits the same behaviour as the FamilyInstance.ByPoint node.
The first run works as expected. But the second run acts on the same elements as the first one did. It does not rotate the newly placed element. It ALWAYS uses the elements that were create the first time the graph is run.

I’ve got the graph completely ripped apart right now. If I can get a working version re-created, I’ll post it.

Hope that explains things clearly enough.

0 Likes