Add propertysetdata to all objects on layer

Hello,

I’m trying to read information from an excel file and add this information to propertysets of objects in the model. So far I only got it working on selecting individual objects. When I select all objects on layer one value gets added per object like this:
image

My script is looking like this at the moment:

Propertyset V3 (all on layer).dyn (151.0 KB)

If anyone can help me that would be really great!

First of all, try using the Object.UpdateProperty node instead of Property.SetValue node. That should allow you to feed in a list of objects instead of a single object. It will also allow you to update the property values, whereas the Property.SetValue node will give you an error if you try to run the script with new values from the Excel file.

The other thing to do is to create a list of lists for the property names and values. The number of lists should match the number of objects that you are adding the property values to, like this:

Lists

Here’s an updated script, give it a try.

Propertyset V3 (all on layer).dyn (71.5 KB)

3 Likes

It works perfectly. Thanks for the explanation and help!