# How does the .SetPropertyValueByName-Node work? (List inputs)

**URL:** <https://forum.dynamobim.com/t/how-does-the-setpropertyvaluebyname-node-work-list-inputs/94992>\
**Category:** Civil 3D\
**Tags:** geometry, dynamo\
**Created:** [October 29, 2023, 4:28pm UTC](https://forum.dynamobim.com/t/how-does-the-setpropertyvaluebyname-node-work-list-inputs/94992 "2023-10-29T16:28:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pumpaij](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@pumpaij](https://forum.dynamobim.com/u/pumpaij)\
**Post date:** [October 29, 2023, 4:28pm UTC](https://forum.dynamobim.com/t/how-does-the-setpropertyvaluebyname-node-work-list-inputs/94992/1 "2023-10-29T16:28:23Z")

</div>

Hello,

I’ve been using the “PropertySetExtensions.SetPropertyValueByName”-node with success but I’ve only ever fed it with one input for propertyName/propertyValue:

 ![SingleInput](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/c/3c96c3b88362b5e6f8dfc7fead265660c21e79fa.jpeg)

With this script, each of my cubes gets its corresponding value for property A. So far so good.

 ![SingleInput_Testsetup](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/0/e0fcd4ed6220c36cdbd6b47f9d1d1f5abf61671c.jpeg)

Now I tried to assign values for each cube for the properties A, B and C simultaneously but no matter what I tried lacing- and levelwise I can’t produce the wanted outcome of A: Value A, B: Value B and so on:

 ![ListInput](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/8/98d9f8145e3a48d9495c74bd50c4afa22d9ab038.jpeg)

 ![ListInput_Testsetup](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/5/25acc3d22033b05723e3b4448934da0c4f179f2a.jpeg)

I don’t understand how this node processes the inputs - if someone could help me out, I’d very much appreciate it! 🙂

[AddPropertysetdataWithListInput.dyn](https://forum.dynamobim.com/uploads/short-url/7Q1ShBVVCt35cEBfMwi8lxlErAP.dyn) (32.0 KB)  
[Testdrawing.dwg](https://forum.dynamobim.com/uploads/short-url/hjgWvETGLCw1fnM6YTUFmDvt5lz.dwg) (573.7 KB)

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [October 29, 2023, 11:05pm UTC](https://forum.dynamobim.com/t/how-does-the-setpropertyvaluebyname-node-work-list-inputs/94992/2 "2023-10-29T23:05:05Z")

</div>

Start by changing this  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/9/69c9fe81bfb415d29b8adcac67cb4a391f1a4f8d.png)  
to this  
`["A", "B", "C"];`

~~Add a _List.Flatten_ node after the _Object.AddPropertySet_ node if the output is a list of lists~~

~~**EDIT** I think its a bug in the _PropertySetsExtensions.SetPropertyValueByName_ node~~

**EDIT 2** Change the code block as above, use levels & longest lacing as below  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/3/b38b0af9d8290571d9c23d34605edf00399b1316.png)

---

<div class="post-metadata">

**Author:** ![pumpaij](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@pumpaij](https://forum.dynamobim.com/u/pumpaij)\
**Post date:** [October 30, 2023, 8:43am UTC](https://forum.dynamobim.com/t/how-does-the-setpropertyvaluebyname-node-work-list-inputs/94992/3 "2023-10-30T08:43:57Z")

</div>

Thanks a lot - you just saved me from a ton of duplicate nodes!  
(And looking at the edits, I’m glad to see that it messed with your head a tiny bit as well! :-))

I think what derailed me was the fact that I immediately discarded settings that led to “12 solids” when I fed the node with 4 solids but apparently that’s how this node works. If it said something like “propertydata” instead of “solid” it would make more sense but apparently it really does duplicate the solids as you can even bring them back into the drawing:

 ![GeometryOutput](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/6/16733f5db5f9aeebd3311a9bdcf2ea59163d7810.jpeg)

I’m just glad it works!
