Batch changing a categories Phase - with data shapes

Hello, and thanks in advance for any input. I have created a graph to batch change all of specialty equipments phase from a dropdown. It worked although it gave an error that the parameter is read only, again it still worked though. I then moved on to Data Shapes and want to get a GUI and a dropdown that the user selects from to batch change phase of specialy equipment once again except this time it does not work and the node Element.SetParameterByName kicks out the error “the parameter storage type is not a string” and now does not work… I have tried many different things and am at a loss. Can somebody please shed some light on this? Revit 2018 with Dynamo 2.02.

Element.Name will give you the strings for the Keys, i think you will need this input for the Values (Note the green ID’s)
Can you try that?

1 Like

Thanks for the quick input. I tried that and tried Document.Phase which returns both. I swapped keys and values up too. Now I get a whole new error.

Another odd thing to note, I have the one I created before I wanted to add the Data Shapes GUI and it works like a charm but still throws an error. But, hey… it works. shrugs

Did you change Document.Phases for Document.Phase by accident?

1 Like

No I tried both which they seem to do the same but I get different results. The results here are strange… no errors in the node but it pulls a random family at the output. “Front Counter”. Did I do that right? I also swapped keys/values but that just gives me the ID’s in my dropdown.

For whatever reason it does change this one family “front counter”. Why just the one?

you can try setting lacing and list@level on the SetParameterByName node
use some watch nodes so you know what you are doing
for example after the All Elements of Category node

1 Like

I am not familiar with list@level or lacing, could you show me what that looks like? Again I really appreciate the feedback.
the lacing option is available when you right click the node
lacing shortest is when you have a list with one result and you have a list with x results this will give you 1 result. eg one phase and 200 equipments
lacing longest will give 200 results

1 Like

Here is what the watch looks like there.

Man, good call. That worked with changing the lacing to @L1, you were right on the $. @L2 gave me just the one result. It still kicks out a “parameter is read only” error but like the others it still works so thank you very much!! I also learned about lacing which will come in very handy with lists.

Thanks again!!

1 Like