FamilyInstance.ByPoint overwrites

I’ve been struggling with the similar problem for a bit, and here’s what I came up with:

  1. Using the ‘Family Instance By Point in Transaction’ node from the Bakery package (authored by @Luke_Johnson), solves the problem with disappearing elements each time you run the graph;

  2. Then I modified this custom node to add an activation for the family symbol:
    # Make sure the familysymbol is active if famtype.IsActive == False: famtype.Activate() doc.Regenerate()
    This ensures that your family, that you have just loaded to the project, will be ‘recognized’ by Revit.

  3. Placed the ‘FamilyInstance.SetRotation’ at the end of the graph, so that Dynamo firstly places my family instances, and then rotates them.

  4. So each time I run the graph, it places new instances of chairs and rotates them:

And here are the caveats:

  1. Using ‘FamilyInstance.SetRotation’ becomes tricky when you need to place families by curve (dynamo ‘curve’ == revit ‘line’). This is because each curve has its direction (oops :rage: ), and so does the tangent vector ('Curve.TangentAtParameter) at each point of this curve. And when you try to get rotation angle between tangent vector and i.e. YAxis, you’ll probably get some negative values;

  2. Of course, the way your family is built (in terms of directions inside the family editor) will also affect rotation. My graph is still work in progress, and I suppose that it won’t be universal as I previously planned;

  3. Instead of using lines, you can get the curves from in-place family by selecting one of its edges. But the problem is that these edges may be cut by walls or other intersecting elements.