Order of operations in script

I’m working on a script to write the ElementID, VectorX, VectorY, VectorZ, VectorLength, LocationX, LocationY, LocationZ to some shared parameters. After writing to these parameters I want to export a Schedule to Excel.


I got every step working, the only problem is that the export is made before the parameter values are set. Does anyone know how I can fix this?

Hi,

You only need one Passthrough Node, it should be second last.

I tried removing the redundant passthroughs but the effect was still the same. I tried to connect the voids of each custom node but weirdly enough no matter which one I connected the result stays the same. I would have thought at least one column would have been populated.
If I run the script twice the export is ok so could it be that some kind of update needs to happen between populating the parameters and exporting the schedule?

use a transaction.end node.

2 Likes

You’ll need to set the parameter value(s), end the transaction, then get the parameter values again if you’re looking for the value after it’s been set.

1 Like

That was it, here’s my final script:


Thanks!