So I'm trying to automate PDF printing to different sizes in Revit, and to do that I loop through a dictionary of sheet names and page properties (custom object).
The problem is that in order to bypass the interface of the PDF printer (pdfforge PDFCreator), I need to address the queue and give each job a different output filename. I think I'm using the right code to do this, but by the time I'm looping through the queue it isn't fully populated yet. So I believe that the actual spooling works in a separate process, on a parallel thread. The same goes for the printer queue ofcourse.
Fortunately, the queue outputs a bool when all jobs are received (have to set a number of jobs to await).
Is there a way to halt code execution until that bool is set to True?
EDIT found a solution... Feel free to delete this topic.