Splitting a list into smaller lists for sorting

Hello. new to dynamo and still learning but I’m stuck on the logic process with this one.
using packages: Orchid and Springs.

I have this list of family instances and I am trying to figure out a way to sort them so that they insert into the proper host and their respective x,y,z coords.

I have put the names of their rough locations as stings into the list in hopes that i could sort by that index, I’m just unsure of what nodes to use or will I be needing python.
Eventually there will be probably a dozen or so families that will needed to be sorted this way.

Any help and input is appreciated

I’m unsure of how you’re programmatically determining host orientation, but it sounds like you want something like GroupByKey. You can use that on your string values (for now) to see how it works but it’s hard to say what your next steps are without more information on what you’re trying to do.

Another option might be to index the walls you’re going to be hosting to and then assign the index based on orientation. That way you can do everything in a single list. Again, it’s hard to know what might be helpful based on what you’ve given us so far. More information would be helpful.

iv’e gone and attached the graph. (yes its kinda messy)

essentially i can take the names of the families from a csv with xyz coords.
Then i load the families from a directory folder.
I have successfully loaded them into project but they are are on the wrong walls.
The host walls are part of the template as this is for a modular housing project so the “ID” of the host walls shouldn’t change.

The spring Package has a node “FamilyInstance.ByHostAndPoint”.
currently it takes the first part and hosts it on the first wall it finds in the list disregarding the xyz.
so everything is being placed on the first wall in the list, then the next essentially tripling the families. one on each wall.
i am trying to find a way to sort either by calling out either the left right or end wall. then feed it into its correct host

Test.dyn (102.9 KB)

How do you currently determine which instances go on which wall? Is it based on types? Is there something in the excel file that says where they should go? Is it just the XYZ coordinates that align with a wall? We can’t automate something that hasn’t been defined yet.

It sounds like maybe the coordinates of each instance should align with a wall face, but your list structure is specifying the walls in an arbitrary order instead of based on location. If that’s the case, then you need to do some kind of location check first. You can see if the point lies on a face of each wall and if so, return that wall. Then you’ll have a wall for each instance.

1 Like

originally i was using the xyz to try and algin with the wall, that worked with generic models but i ran into issues when cutting the voids so i switched to wall hosted elements. All these families are windows, doors or some form of wall penetration.

I then added a column in the excel that specifies what wall it is supposed to be the host ie: Left or Right. I do this with an IF statement based from the xyz ranges. I figured I could filter with that extra list separating the family types into their respective walls.

This works but you could just do the IF statement in Dynamo instead of reading it from Excel. Sounds like the same process would work for determining intersection or even coordinate bounding.

You essentially need to do the same thing with the walls now. You could just determine the order of your walls and index based on the IF statement, but it’s “better” to determine wall location with a similar method - ie: minimum, maximum, and middle coordinates align with the left, right, and end wall respectively.