Detail Item Refresh Schedule Order

Could someone help I have the script set up to what I want but the last part with the Element.SetparameterByName is giving me an error.

I am trying to refresh a custom parameter on a detailed family to show up on a schedule. This option will be deleted depending on the choices selected.

Here is the dynamo image.

Can you explain a little more about what you’re trying to do? It’s hard to tell just from the graph how you want to reorder the elements.

However, the issue is that you’re not supplying an element when attempting to update the parameter. You’re supplying the parameter value.

I use an add-on called Lotspecs where you create a lot specific floor plan base on options codes. I am trying to reorder the parameter values alphabetically order once we solve a lot specific plan for a customer.

From the group of items that I want to change the value, there are duplicates which is why I am feeding elements into the List.UniqueItems to combine them together.

Is there a way we can turn the list.UniqueItems back into elements? to feed into the Element.SetParameterByName?

Here is a picture of the schedule for reference.

The schedule would control the sort order. How do you know which option gets which value? Right now you’re just getting the options in the order they were created and sorting them that way.

Sort of. Instead of getting the unique values you could use GroupByKey on the elements and their individual values. This would leave you with the unique values and the elements assigned to that value.

That did the trick I was just using the wrong node. The List.GroupByKey grouped all the duplicates and then updated the Letters.

Thank you.

Here is the finished result