Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
andydandy74 committed Oct 22, 2024
1 parent 6a1787c commit 4c8dd81
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions nodes/3.x/python/FamilyParameter.GetValueByFamilyType.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@
def GetFamParamVal(ft, fp):
if fp.StorageType == StorageType.Integer: return ft.AsInteger(fp)
elif fp.StorageType == StorageType.Double:
if version > 2021:
if fp.GetUnitTypeId() and ft.HasValue(fp): return UnitUtils.ConvertFromInternalUnits(ft.AsDouble(fp),fp.GetUnitTypeId())
else: return ft.AsDouble(fp)
else:
if fp.DisplayUnitType and ft.HasValue(fp): return UnitUtils.ConvertFromInternalUnits(ft.AsDouble(fp),fp.DisplayUnitType)
else: return ft.AsDouble(fp)
if fp.GetUnitTypeId() and ft.HasValue(fp): return UnitUtils.ConvertFromInternalUnits(ft.AsDouble(fp),fp.GetUnitTypeId())
else: return ft.AsDouble(fp)
elif fp.StorageType == StorageType.String: return ft.AsString(fp)
elif fp.StorageType == StorageType.ElementId: return doc.GetElement(ft.AsElementId(fp))
else: return None

version = IN[2]
if isinstance(IN[0], list):
if isinstance(IN[1], list):
OUT = []
Expand Down

0 comments on commit 4c8dd81

Please sign in to comment.