export pdf dytnamo revit
#Sean Page, 2021
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('System')
from System.Collections.Generic import List
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
Sheets = UnwrapElement(IN[0])
Names = IN[1]
Folder = IN[2]
result = []
sheets = List[ElementId]()
opts = PDFExportOptions()
#This will uses the Sheet Size for Paper size, or default to Letter
opts.PaperFormat = ExportPaperFormat.Default
for sheet,name in zip(Sheets,Names):
opts.FileName = name
Sheet = List[ElementId]()
Sheet.Add(sheet.Id)
result.append(doc.Export(Folder,Sheet,opts))
OUT = result