Skip to content

Commit

Permalink
Update export.py
Browse files Browse the repository at this point in the history
  • Loading branch information
marcantondahmen committed Jan 29, 2021
1 parent 0f48df5 commit 69b4743
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions revitron/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ def __init__(self, setupName):
self.options = revitron.DB.DWGExportOptions().GetPredefinedOptions(revitron.DOC, setupName)


def exportSheet(self, sheet, directory, template = False):
def exportSheet(self, sheet, directory, unit, template = False):
"""
Exports a sheet.
Args:
sheet (object): A Revit sheet
directory (string): The export directory
unit (object): The `export unit <https://www.revitapidocs.com/2020/1d3eb4f4-81d2-10a6-3eab-4a9c20e39053.htm>`_
template (string, optional): A name template. Defaults to '{Sheet Number}-{Sheet Name}'.
Returns:
Expand Down Expand Up @@ -70,7 +71,7 @@ def exportSheet(self, sheet, directory, template = False):

db = revitron.DB
self.options.MergedViews = True
self.options.TargetUnit = db.ExportUnit.Default
self.options.TargetUnit = unit

success = revitron.DOC.Export(path, file, List[db.ElementId]([sheet.Id]), self.options)

Expand Down

0 comments on commit 69b4743

Please sign in to comment.