Modify Sheets Before Print in One Script?

Hi All,

I have created a script that makes changes to a label on certain sheets of a Revit model and I then want it to print those sheets. I have it all working except that when it prints the sheets it prints the sheets without the changes to the labels that are made earlier in the script. I made sure that the printing comes after the changes to the label by how I ordered it and by using passthrough nodes but it still doesn’t print the changes. I assume that the print node (I’m using the one from the latest Orchid package in this case) triggers something when the script is first initialized that takes a snapshot of the sheets at that time instead of when the script gets around to executing the print node.

Is there any way to force a refresh of the sheets before it prints? Or does anyone know of a printing node that prints at the time of the node’s execution?

Thank you for taking the time to read/consider this issue!

Add a Transaction.End and a Transaction.Start node after your WaitFor node.

Basically the model doesn’t get a trigger to finish setting the variables until Dynamo finishes running. Therefore when Revit goes to print in the new parameter values haven’t been committed just yet.

1 Like

Thank you Jacob! That’s exactly what it needed. I had been searching for refresh or update nodes and didn’t realize it was committing transactions that I was looking for.

1 Like

It’s a pretty common stumbling point. I think transactions may become my next general info thread. Perhaps an AU session if I can find 60 minutes of content on it (likely easy enough to do).

Glad you’re squared away. :slight_smile: