Description:
I have a Dynamo script that successfully exports the currently open sheet or view in Revit as both a PDF and a DWG. However, by default the script places these files in the same folder as the Revit project (.rvt).
What I need:
- Detect the folder path where the active Revit file is saved.
- Create (if it doesn’t already exist) a subfolder named “export” inside that project folder.
- Export the PDF and DWG files into this export subfolder, using the sheet name/number (e.g.
A101_Totaalblad.pdfand.dwg) for the filenames.
Current workflow:
Problem:
Everything works except the exports still end up in the base project folder instead of the export subfolder.
Question:
How can I adjust my Dynamo graph so that:
- It reliably recognizes (and creates) the
exportsubfolder next to my.rvtfile? - It writes the PDF and DWG exports into that
exportfolder, instead of the root project folder?

