Split integers from List & Unnesting List

There are two things I’ve been trying to get a list of coordinates to do.

Here is the current list.

The first goal is to get the list to associate with the ID number it is nested within rather than nest in it. Like this:

The next hing would be to extract the X & Y integer values throughout the entire list as separate line items. To resemble:

List

[0] – 97.119, 267.831

[1] – 28.192, 268.081

If possible, it would be even better to place the X and Y integers on different lists.

I’ve attempted the String.split node among others to no avail.

I’ll eventually would want the new lists to be transposed with several other lists. Like below:

Any tips on how to proceed?

Thanks,

SW

Thanks Vikram! That helped a lot. I still have a couple of issues remaining on another list I have.

After flattening the list, I am looking to return the associated Room (or Area) names for each item on the list. I can already return the element ID and the like, but not the other information.

I am also still unsure how to extract the StartPoint X/Y values, EndPoint X/Y values and Lengths to be separated like in the example where Point.X was used in another list.

Thanks again for your assistance. I am really starting to get the hang of this.

-S.W.

Flatten destroys the list structure that might help to associate sub-list groupings with other properties (such as rooms, in your case)
If you want to retain that information Flatten, if required will have to be done in a more nuanced manner.
It will be difficult to provide a generalized solution/suggestion. You’ll need to provide more information.

As for the line, you should first extract the Start and End points using the relevant nodes and then proceed to extract the coordinate information of each of the points as shown above.

Thanks again. I meant having the (unflattened) list:

Return something like this:

I could flatten and transpose after extracting all of the data.

The end goal is to have a CSV file with column data similar to this:

Room Name | Boundary ID | Start X | Start Y | End X | End Y | Length

Where each boundary element can be joined to other room data in a relational database.

Thanks,

-S.W.

On what basis do you intend to split the 14 lines at index 0 into two sub lists?

The 14 lines at index 0 would remain grouped together. Each of the 14 lines would return the same room name. The lines at index 1 would all return a different room name, which the boundary vectors share in common within the index.

-S.W.

This should help …

RoomDataToCSV.dyn (14.6 KB)

Thanks! I will follow the general structure of this to return the outcome. It seems that I am encountering null values for the coordinates/boundaries lists upon combining them with the Rooms list (from the last combine node in the chain). I will look around the forum to see why that is.

Best,

-SW.