Place grouptypes at points

Hy everyone,

I’m using this script to place group types at point, but i have here a list of grouptypes. how can i adapt it ?
error : expected grouptype, got list

thank you


Is the bottom picture during the same run as the error? Because it looks like you are taking a single item, not a list, as the groupType.

Otherwise, to change the script to go through a list, you just need to iterate it using a for loop. Replace line 39(?) with:

output = []
for gT in groupType:
    newGroupType = doc.Create.PlaceGroup(locationPoint.ToRevitType(True), UnwrapElement(gT))
    output.append(newGroupType)

Another method for letting a node iterate through a list is to make it into a custom node.

1 Like