Finding duplicate values across lists

I’m trying to use Dynamo to rename my interior elevations based on room name and room number. I have it working properly, except for rooms where multiple elevation markers are individually placed (as opposed to rooms where a single elevation is placed, and then the other elevations are activated by checking the boxes of the other directions)

in order to give each elevation view a unique name i was adding a numeric suffix to the end of the Room Name + Room Number string. But when multiple individual elevations are placed in a single room, it stars the sequence over again, resulting in duplicate names.
dynamo1

How might I search for duplicate values across multiple lists, in order to then add additional data (maybe a, b, c, d, etc)?

Here’s the graph i have been working with:
Interior Elevation Namer.dyn (65.4 KB)

Hey,

Would it work if you flattened the list and then grouped it up again ‘by key’ (room name)?

Then you can number them as you did before… But all the elevations from the same room will be in the same sub-list?

Hope that helps,

Mark

2 Likes

This is good.

You can also group the groups instead which would be faster as it would be less data to query and sort things by, and then flatten the groups of groups to get the same list.

1 Like

The most through way to get to a robust dataset would be to get elevation tags by room. I’d check what room the marker is located by using the bounding box center and use IsPointInRoom. This would give you a clean set of data neatly grouped by room. From there the numbering is much simpler - you know how many markers your are dealing with in each room.

This has the added advantage of leaving behind any exterior elevation markers not in a room (and someone just maybe used the wrong type - happens.)

Will run a smidgen slower but will be nice and neat.

In Python I’d use two filteredelemetcollector sets and run through the list of markers against each room with a break when the room is found.

1 Like