Placing Model Groups at Point

Found this old definition where it places Model Groups at Point, only thing it throws an error in python code, is there a better solution availble:


The error states that the code is expecting a single group but you’re providing a list. You just need to update the code to run on a list of groups. There are plenty of other posts on the forum that discuss this exact issue and how to solve it - see if you can find one of those.

1 Like

Thanks Nick, had a look at past alternatives, and somethings does not add up, this .py seems to place groups but only the same group, multiple times, I am looking to create a grid of all model groups exluding detail groups:

You’re getting the group at index 1 and then duplicating it for each point. So yes, it will place the same group at each location. It seems like you just need to provide the full list of groups instead, but we can only guess unless you show us the node previews for everything you’re providing to the python node.

1 Like

Yes, thats exactly what i was trying to achive, as .py code code was written with one instance placement in mind, in my case i have “N” number of groups to place, but i think im mismathcing the points numbers with total number of groups available:

Your list of points is a list of a list. You flatten it afterwards but you need to provide the flattened list to the python node so that the list structures match between the points and the groups.

Look into zip() in python. It allows you to iterate through multiple lists at the same time. That way you can just step through each point and group at the same time.

1 Like

Ill have a look at that, but thats way over my basic graplings with .py i still think this code does not not work in my case as it was written for a single group iteration in mind.