Wait for Area and Volume Computations after Space Creation

I’ve got a dynamo script that will create spaces from rooms in a linked model. It does this successfully, however when I go to validate the spaces via area and volume they are all ‘0’ despite the Space Schedule in Revit showing otherwise.

My suspicion is that the Parameter.Value dynamo nodes are querying the spaces before whatever internal Area and Volume Computation can occur. Should I just use a quick and dirty python script to wait with ‘time.sleep’? Is there a cleaner way to do this?

Ok. I just split it into two scripts.
One creates the Spaces. The next validates and tags them. Revit’s internal computation can catch up in between.

Try using a Transaction node to split the script into two separate transactions. You can’t usually query something in the same transaction it’s created.

1 Like

The creation of the spaces happens in a Python node that closes the transaction prior to the query. Is there a separate overarching Dynamo transaction?

At any rate, the two Dynamo scripts approach works for me. Thanks!

Yes. There are transaction nodes that spit your Dynamo script into two (or more) separate transactions in Revit. I understand you have a working solution now, but I just wanted to explain how you could get this to work with one.

1 Like

Ah! That’s handy to know for future reference. Thanks, again!