Hello! I’ve read a lot about similiar topics on how to array an object along a curve (which I guess is much more difficult than a straight line). I found it very difficult to work with geometry in Dynamo so after hours of trying, I hope someone here can help me with this.
I would like to draw a straight line in Revit, choose a family, and array it along the line and be able to control the distance the two families.
What I dont want though is to have the line there as a visible element. The line is only there for guidance so that I can choose where I want to array the families.
Thank you so much for your help.
I’m having difficulties trying to understand how the geometric nodes work.
I dont know how to define the array count + spacing along the selected line and how to place the families.
What you’re describing now is a Translate (moving the array of points a fixed distance away).
You would take the list of points from your Curve node and pass them through a Geometry.Translate node to get the new positions. I’ll leave it as an exercise to you to try this out, there are a few Translate methods so you should find one that makes the most sense to your workflow.
That makes a lot of sense. But I’m still very confused. I don’t know which way I should solve it.
Isn’t it possible to start the first family from the beginning of the line and then array it from the center?
Because if I want to move the array of points a fixed distance away, that distance depends on the geometry of the family. That sounds extremely complicated.
I’m confused.
Btw, do you know why there is some kind of untouchable line there after you run the script and even delete the old line manually afterwards? There is like a blue line there that you can’t delete.
When you create a range, you can get FamilyInstance parameter data to feed the start point.
For the blue line, you can right-click and turn off preview.
In the code block which i specified the range starts with 0, however you can change this value out for another value or even an input, like this:
StartDistance..Curve.Length(curve)..Spacing;
Then you can create the same sort of input for the start distace as the spacing.
Also if you want do determine how far you exactly you need to go, you could get the geometry of the family > faces and check what the intersection point is with the line, then use that distance as the startdistance input.
To determine what this start distance needs to be you should:
Get the geometry of the family
Get the faces of this family
Get the startpoint of the line and the tangent, reverse it and create a small line in the opposite direction
Determine the intersection point between the face on the left and the line.
Determine the distance from the startpoint of the line and this intersection point.