Pulling data from sublists

Hello all,

Just curious about how to pull particular data from a sublist - I’ve been playing around with a whole bunch of List nodes to no avail.

I’m sure I’m just missing out on some syntax but neither google nor a search in here has given me much luck.

As in the image below, how would I go about pulling out data for:

Orange: A point that contains a particular Z value? ie. All points with a Z value of 2.250

Blue: A range of sublists? I was thinking it something along the lines of; 0[2]…0[7] or {0[2]…0[7]}. ie. all series of points from the 2nd value in the zero list to the 7th value in the zero list.

Dynamo_Sublist_Data_Pull

Hello

Such?

0…1…0.1;

1

Hey Sol,

On Blue:

You have multiple options in Dynamo; you could either pick out the sub-list and then proceed as usual, or if you want to have a neater workspace, try out some DS syntax.

On Orange:

There’s a lot of options to do that kind of filtering but the most common involve one of the list filtering nodes. Note however that I cheated a bit - I used integer values for Z. Usually points, especially the ones imported from Revit, will use floating point numbers(also known as doubles in Dynamo) and will have n amount of numbers after the decimal.Dynamo does some rounding to keep things manageable and two seemingly equal doubles might end up being different at their 13th decimal point…Therefore to make your life easy, you might be required to do some rounding first.

 

Capture1

When working on sublists, use List.Map or List.Combine.

Here’s how you would filter by Z coordinates:

FilterNestedList

And here’s getting items at indices:

GetItemAtIndexMapped

Ah brilliant, you guys are total legends. Many thanks, i’ll play with that.

sorry, it was wrong translated post by me, English is not my native language.

moderator, please remove my previous and this message in this topic, thank you

Hello, so I have a list with multiple sublists. From the first sublist I want to delete the first index value, from the second sublist I want to delete the second index value, and so forth. Is there a way I can specify which index to delete from each sublist? Thanks!

RemoveItem

Great thank you ORGANON!