Print to PDF Active Sheet with modeless form

Hi All,

First attempt to a modeless form to print to pdf the current open sheet. I’m following the modeless form example from pyRevitMEP.

image

I get an error. “Starting a transaction from an external application running outside of API context is not allowed.”

Any suggestions ?

This is how it is done the color splasher tool for example

I actually solved by looking at the “Rename Views” tool from pyRevitMEP.

Would you care pointing at the error in your code and how you solved it, so that it can help others?

Pretty good solution by Cyril!

image

image

image