December 8, 2022, 8:05pm
I wanted to make a quick script to set the Space Type parameter of a space based on a filtered list.
But when I use a string to set the parameter value I get an error that says “The parameter’s storage type is not a string”.
It seems like the storage type is ElementID but I’m not sure how to create a parameter value for an Element ID.
December 8, 2022, 8:17pm
You’ll need to send in a Space Type element rather than a string.
You can get the space types like this:
You can then filter out the one(s) you require.
December 8, 2022, 8:37pm
Okay follow up question, I ran into a small snag because there are some space types with similar names.
Is there a way to select a specific element of a list and pass that value along?
December 8, 2022, 8:39pm
You could use an == to check for an exact match to the name string rather String.Contains (I’m guessing that’s what you’re using, your graph is zoomed out too far to see node names).
December 8, 2022, 8:51pm
Okay I will give that a try, Thank you! But hopefully the last error, it seems like I can’t set multiple element values at the same time, is there a way around this?
December 8, 2022, 8:59pm
I’m actually not sure on that one - I’ve never used that node before so I’m not sure what inputs it’s expecting. If you plug the right inputs into an ‘Element.SetParameterByName’ node you should be good.