I would like to add to that list the ability to choose where we save a pdf. After the update it now creates a folder on my desktop and saves the pdf there. I then have to move it to itâs destination. I donât remember having to do that before the update.
I know I recently figured out if I combine pdf then I get the normal pop-up, but if I donât it creates a folder. So Iâve just been âcombiningâ everything.
That would, and does, infuriate me personally.
I have figured out how to get it back to ânormalâ.
It requires changing the pyRevit script in AppData\Roaming\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Print Sheets.pushbutton.
Warning: This will overwrite files with the same name in the directory you choose.
A few steps and a lot of looking for code.
Replace get_dir (around line 52) with the following:
@staticmethod
def get_dir():
# Sets the main directory to your specific folder
return r"C:\YOUR PATH HERE"
Replace get_folder (just below get_dir) with:
@staticmethod def get_folder(task=â_PDFâ): # Returns an empty string so no timestamped subfolder is created return ââ
Find def _verify_print_filename (around line 460) and replace with:
def _verify_print_filename(self, sheet_name, sheet_print_filepath): # Check if file exists if op.exists(sheet_print_filepath): try: # Attempt to delete the existing file to allow overwrite os.remove(sheet_print_filepath) except Exception as e: # If we canât delete it (e.g., file is open), log an error and skip logger.error( "Could not overwrite existing file "%s". " âMake sure the PDF is not open. Error: %sâ, sheet_print_filepath, e ) return False return True
I donât know how to get syntax right on these forums. If youâre not good with Syntax you can ask AI to fix this for you. I hope that helps.