Skip to content

Commit bce9499

Browse files
authored
Scale elevation with internal (#941)
1 parent 744b185 commit bce9499

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Connectors/Revit/Speckle.Connectors.RevitShared/HostApp/LevelUnpacker.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ public List<LevelProxy> Unpack(List<Element> elements)
5252
displayValue = [],
5353
properties = _propertiesExtractor.GetProperties(level)
5454
};
55-
levelDataObject["elevation"] = level.Elevation;
55+
var unitSettings = _converterSettings.Current.Document.GetUnits();
56+
var lengthUnitType = unitSettings.GetFormatOptions(Autodesk.Revit.DB.SpecTypeId.Length).GetUnitTypeId();
57+
levelDataObject["elevation"] = UnitUtils.ConvertFromInternalUnits(level.Elevation, lengthUnitType);
5658
levelDataObject["units"] = _converterSettings.Current.SpeckleUnits;
5759

5860
levelProxies[element.LevelId.ToString()] = new LevelProxy()

0 commit comments

Comments
 (0)