Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
andydandy74 committed Nov 9, 2024
1 parent 779e6d5 commit 4fad97e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nodes/3.x/python/Sheet.Scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

def GetViewScale(view):
if hasattr(view, "Scale"): return view.Scale
def GetSheetScale(sheet):
if hasattr(sheet, "Scale"): return sheet.get_Parameter(BuiltInParameter.SHEET_SCALE).AsValueString()
else: return None

views = UnwrapElement(IN[0])
if isinstance(IN[0], list): OUT = [GetViewScale(x) for x in views]
else: OUT = GetViewScale(views)
sheets = UnwrapElement(IN[0])
if isinstance(IN[0], list): OUT = [GetSheetScale(x) for x in sheets]
else: OUT = GetSheetScale(sheets)

0 comments on commit 4fad97e

Please sign in to comment.