Updating labels in a viewport family

I’ve created a dynamo script that updates a shared parameter used in a label for a viewport family. I am able to update the parameter for all my views but in some cases the labels in the viewport family don’t update. For example all the plans and elevations are updated but details and section viewport labels are not. Is there a way to “refresh” all the labels in revit document? I’ve seen some references to Document.Regenerate from the Revit api but I’m not sure how to implement it.

 

I’ve found that you can rotate the view and rotate it back to update the display.

Do you think that would be a good idea for 500+ views. Changing the viewport family works too. Also nudging it. Not sure how to accomplish this in dynamo. Thanks for your help

I have a node in Rhythm that does just that, we’ve used it on several hundred views but it is probably super inefficient. Hopefully an API person can weigh in as well!

Changing the “pinned” status also works.