Boolean to extract minimum value in a list

Hi everyone,

I’m a newer in a Dynamo and I’m trying to create a routine that read a geometric point of a column and the name of the column.

I get the coordenates points and create a vector. In my sample example, I have only four columns.

The order of the columns isn’t the same order to the text. So I put a value to get the minimum value of the list.

It worked but when I tested in a bigger project, this number pic two values in the same sublist. If I lower the number, sometimes any value is true in a sublist.

I’d like to keep this structure for all items need to be tested if it’s the minimum value in a boolean. This information will be used to get the correct value of the name and force of the column.

You can just use List.MinimumItem to find the minimum value in a list. You could then get the index of the minimum value and use that to identify the name closest to the column.

This of course is assuming that the name is just dummy text and not actually associated with the column. Otherwise you could just get the value from the column itself.

Hi Nick,

Thanks for fast reply. I tried it, but I didn’t manage how to work in this information after.

In my example…

my upper list (<) I have in 0 list

0 false
1 true
2 false
3 false

Comparing if list.map in lower

0 P1
1 P2
2 P3
3 P4

I need to get P2 for the first list.

In the list 1, the true is in the 3 index (P4).

Maybe I have to compare the vector list with minimum value in a boolean, but I sttoped here.

List.MinimumItem is giving you the minimum value from your four sublists. You can then use List.IndexOf to get the index of the minimum value from its original list. That index would then correlate with the name closest to the column, allowing you to get the name at that index from your list of names.

EDIT: Example

Fantastic Nick! This way was much more easy.

I’ll print your solution above and mine with a problem low.

I’ll modify the nodes and test after. I’ll share the results finished.

Thanks a lot!

Look into List.FilterByBoolMask. That’s the exact function you’re trying to replicate with the booleans. I only suggested MinimumItem because it simplifies your process and doesn’t require you to provided a “minimum range” with the possibility for multiple values.

I see. For me, your solution was great, even not using boolean.

Now, I almost finished.

I’ll add the nodes to get the dimentions of the colums and organise the groups.

It’s done! Now, it’s working.

I imported the CAD file

Get the geometric point of the region and the coordinates of column names and force.

After join this informations, I export to Excel

If it’s necessary to anybody I can share this file.

I’ll conclude this soon.