# Create line From list of points

**URL:** <https://forum.dynamobim.com/t/create-line-from-list-of-points/30013>\
**Category:** Geometry\
**Created:** [December 23, 2018, 7:36pm UTC](https://forum.dynamobim.com/t/create-line-from-list-of-points/30013 "2018-12-23T19:36:07Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![khalili\_masoomeh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/khalili_masoomeh/32/76505_2.png) [@khalili\_masoomeh](https://forum.dynamobim.com/u/khalili_masoomeh)\
**Post date:** [December 23, 2018, 7:36pm UTC](https://forum.dynamobim.com/t/create-line-from-list-of-points/30013/1 "2018-12-23T19:36:07Z")

</div>

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

 ![811](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/1/41d104bde645816839b7c210d7d4fce7f8c62ad2.png)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [December 23, 2018, 8:05pm UTC](https://forum.dynamobim.com/t/create-line-from-list-of-points/30013/2 "2018-12-23T20:05:10Z")

</div>

Line.ByBestFitThroughPoints I believe.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [December 23, 2018, 8:05pm UTC](https://forum.dynamobim.com/t/create-line-from-list-of-points/30013/3 "2018-12-23T20:05:35Z")

</div>

Or Polycurve.ByPoints

---

<div class="post-metadata">

**Author:** ![khalili\_masoomeh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/khalili_masoomeh/32/76505_2.png) [@khalili\_masoomeh](https://forum.dynamobim.com/u/khalili_masoomeh)\
**Post date:** [December 23, 2018, 8:19pm UTC](https://forum.dynamobim.com/t/create-line-from-list-of-points/30013/4 "2018-12-23T20:19:31Z")

</div>

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

 ![990](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/c/ec3363a7bbacde98fb9f23a117ba34078a41f291.png)

I want it to be line not a polycurve .

---

<div class="post-metadata">

**Author:** ![Ewan\_Opie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ewan_opie/32/77070_2.png) [@Ewan\_Opie](https://forum.dynamobim.com/u/Ewan_Opie)\
**Post date:** [December 23, 2018, 9:10pm UTC](https://forum.dynamobim.com/t/create-line-from-list-of-points/30013/5 "2018-12-23T21:10:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [December 23, 2018, 10:17pm UTC](https://forum.dynamobim.com/t/create-line-from-list-of-points/30013/6 "2018-12-23T22:17:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ewan\_Opie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ewan_opie/32/77070_2.png) [@Ewan\_Opie](https://forum.dynamobim.com/u/Ewan_Opie)\
**Post date:** [December 23, 2018, 10:48pm UTC](https://forum.dynamobim.com/t/create-line-from-list-of-points/30013/7 "2018-12-23T22:48:57Z")

</div>

You are right, it does return Curves.

 ![IMG_20181224_114115](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/e/0eb94a498730f1106ef430a5df87dbf43986bd40.jpeg)  
These could be converted by extracting their start and end points, then rebuilding them as new lines with the OOTB node. 😉

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [December 23, 2018, 11:58pm UTC](https://forum.dynamobim.com/t/create-line-from-list-of-points/30013/8 "2018-12-23T23:58:41Z")

</div>

> [@Ewan\_Opie](#):
>
> These could be converted by extracting their start and end points, then rebuilding them as new lines with the OOTB node. 😉

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.

---

<div class="post-metadata">

**Author:** ![khalili\_masoomeh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/khalili_masoomeh/32/76505_2.png) [@khalili\_masoomeh](https://forum.dynamobim.com/u/khalili_masoomeh)\
**Post date:** [December 24, 2018, 8:50pm UTC](https://forum.dynamobim.com/t/create-line-from-list-of-points/30013/9 "2018-12-24T20:50:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![khalili\_masoomeh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/khalili_masoomeh/32/76505_2.png) [@khalili\_masoomeh](https://forum.dynamobim.com/u/khalili_masoomeh)\
**Post date:** [December 24, 2018, 8:51pm UTC](https://forum.dynamobim.com/t/create-line-from-list-of-points/30013/10 "2018-12-24T20:51:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kennyb6](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kennyb6](https://forum.dynamobim.com/u/kennyb6)\
**Post date:** [December 27, 2018, 1:24am UTC](https://forum.dynamobim.com/t/create-line-from-list-of-points/30013/11 "2018-12-27T01:24:25Z")

</div>

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.
