# Create line From list of points

Hello everyone.
is there anyway to create line Between these points? i just want “line” not a “Nurbscurve”.

Line.ByBestFitThroughPoints I believe.

1 Like

Or Polycurve.ByPoints

1 Like

line.ByBestFitThroughPoints create a line like this. but i want to draw a line between every 2 points.

I want it to be line not a polycurve .

If you use Polycurve.ByPoints as @jacob.small has suggested, then extract the individual segments with the Polycurve.Curves node then you will get a list of lines between each of the points.

Is there a reason you need to have the output as a single line? Line elements in Dynamo are planar and your geometry is curved in two directions, so another type of geometry (polycurve or nurbscurve) will need to be used.

What is the end result that requires a line to be defined?

2 Likes

Polycurve.ByPoints a s Polycurve.Curves as @Ewan_Opie noted is one way, but that may result in a Curve, not a Line (I’m laptopless for a bit so I can’t test it).

If that’s the case and you need stuff classified as lines, you could do a List.Chop to create pairs of points, List.ShitIndicies and then a second List.Chop node and then use a Line.ByBestFitThroughPoints on both of the sets of point pairs.

1 Like

You are right, it does return Curves.

These could be converted by extracting their start and end points, then rebuilding them as new lines with the OOTB node.

1 Like

Yes -but you’re doing more complex calculations and going though added steps to get to the same result.

A third option:
Two List.Drop nodes: one with a 1 value for the drop, and one with a -1 for the drop.
Line.ByStartPointEndPoint with the -1 as the start, and the1 as the end.

1 Like

thank you so much Ewan for replying. yes I want to export it to tekla.

thank a lot @jacob.small and @Ewan_Opie for answering.

If a post has solved your question, please mark the best post as the solution so others can easily find the answer if they run into similar problems.