Order of Operation not working

Hi everyone,

I have what I thought to be a very simple exercise, but I cant get it to work as intended. I am using DataShapes to set three parameters via Radio Buttons, and this works fine. I then want to immediately read those parameters that I have set, but I keep getting zeros across the board… In this example they should all be 60, as that is what they have been set to and also what Revit is displaying after the process is complete. How do I wait for the parameter to be set, and then read the parameter again?
I have tried the below, which is not working.

In my mind what I thought I was doing was waiting for all parameters to be set, then passing through the elements to read the parameters, but it isn’t doing what I need… Do I need to do something with Transactions?

Thanks!

Hi,

What kind of parameter is it?
Instance or type? Yes/No parameter?

Hi,

They are all Instance, Integer parameters.

Hmm,
Try to change the lacing to longest by the await node

Is the value “60” in Revit?

Unfortunately that didn’t work, just gave me my 3 lists instead of the one.
And yes, the values are all 60 in Revit. If I disconnect something and run the script, then reconnect it and run it again, it updates to 60. But I need it to be done in the same operation, not two separate runs.

Try this: After setting the value, put a Transaction.End node and then a Transaction.Start node. Take the result of that and feed it into the Element.GetParameterValueByName node.

Reason it may work: While you have sent the command to set the values, they have not yet been committed and as such you’re reading the prior value.

2 Likes

That worked, thanks very much Jacob!

1 Like