Sorting multiple lists by unique Items


Could someone help me whith my problem? I have a list of points, taken from DWG. Each point is located on a certain layer, have XYZ-coordinates and index number. I need to create a polygon of points on a certain layer. The number of layers is about 400. All what I can do for now is to sort manualy the list of points by the certain layer. And I found the function how to get unique layers from the list of points. But I can’t link them. I think this is a bad idea to create 400 copies of working chain of nodes. And there is anothe problem - if I manualy seting the names of the layers in Dynamo they can be different from the layers in DWG. So that is why I need to sort the list of points by the unique layers and create polygone of all points on each layer.

Are you trying to write to DWG with this?

Can you post your source files?

No, I want transmit this polygons in Revit. In my test file there is only two different layers. In original file there are many more.

Revit doesn’t have layers…

You could group them by the results of column A though

I know and I am don’t trying transmit layers in Revit. I want create polygons in Dynamo and transmit them. My problem is that I can’t divide points and create 2 polygons from one list automatically

Group the X and Y values using the layer as a key. I previously thought it was column A but I guess the column C.

List.GroupByKey using the 3rd column after transposing your excel data, and then set your lacing/levels correctly to create the polygons by this value.

It seems that I’m doing something wrong…


and I need them looks like that
Yes, I didn’t applied Z-coordinate, but it dosen’t matter, I steel have one list and two types of the layers. Thanks to Your advice I got the unique keys and groups from one node, but … that’s all I’ve got))

I’m soory that I can’t post the source files, I’ve just registred and don’t have the permision to do that.

Once you get your points grouped you’ll need to sort them in a clockwise or counter-clockwise order. You could try something like this:


You could also try creating a complex hull from the point list - not sure it will give you the results that you’re looking for though. I believe that Clockwork has a node for this, though it may be lunchbox.

Thank you for your advice but I haven’t node “Vectors.AngleBetween”. Where did you get that? I finded “Point.Average” in Clockwork and after it I stucked…

Oh sorry, that one is from Rutabaga. LunchBox also has one.