PolyCurve.Bypoints doesn't work with Single Entries

Hey there,

I am trying to connect serval points to a polycurve but the node has issues with the entries which are null.
I tried the solution of this topic: PolyCurve.Bypoints didn't work well but it didnt work for me.
I also tried to flatten the list but this wouldn’t give me the right result either.
So I was wondering if someone here has an idea how to solve or work around this problem.

Thanks and best regards,


The issue there is that you only have one point (the end point) so it cannot create a polycurve with only one point.
This happens when you have a list with only one line (so where it is straight). I will suggest identifying the sublists where you have this problem and adding the start point to this sublists so you will have two points and your polycurve can be created

Do you have an idea how to do that?
What do you mean with adding the start point? I only have this set of points.

What is your end goal with the graph? Post a sample data set (maybe one small alignment) and a sketch showing what you are after as it will help others understand your end goal better.

So I basically want to have a line next to my line which I created out of a set of points. The distance has to be exactly the same all the time.
I tried it with an example which worked fine, but the list of points is in a diffrent structure in the data set I have to work with.
The picture I posted above is so close to the solution so I thought there might be just a simple thing I missed…
Example.dyn (135.3 KB)

Hi @tilman,

This example works fine because it’s using a single list of points, but it looks like what you’re showing above has nested lists. Can you post the actual data that you’re working with? It’s probably just a problem with the list levels, but it would be easier to diagnose with the real thing.

Workflow.dyn (77.2 KB)
I can’t upload Shapefiles here which is the source oft the point data, so I uploaded it to google drive.

This is how it looks to me, and my problem is that the new curves are with holes.

Thanks. I wasn’t able to get it to work by importing the geometry from the SHP because this part returned nothing (I don’t think the ‘RIKZ’ field exists).

So I skipped that step and imported the SHP into model space using MAPIMPORT. I then separated the lines onto layers for left and right (I assumed that these are rail centerlines?) so I could create an example of creating the offset curves for multiple centerlines. Here’s the result:

Workflow_MZJ.dwg (437.3 KB)
Workflow_MZJ.dyn (45.4 KB)

1 Like

I’m unable to get the SHP file to open in your graph.

Why not build a polycurve of the original data, and offset that?

Thanks for your help!
First of all I am wondering why the .shp file is not working for you, because for me it works just fine

The workflow from @mzjensen works even with the point data from the shapes. Although it looks a bit weird in Dynamo, using feature lines the result in the model space looks correct.

The only problem for me is that the workflow only works with the .dwg you shared @mzjensen. Is there any reason for that. Is there any node that requires the map import? When I am trying to run the graph on a empty model space it’s not working.
Workflow_MZJ_TH.dyn (113.9 KB)