Message 1 of 4

Not applicable
05-01-2019
02:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi!
I'm trying to get the surface of a topography. I've seen that if I select the element in Revit I get a different area than the one I get programming. As you can see in the images.
In Revit the value is 3611,301 m2.
And in Visual I get the value: 4057,8436
For that I use the next code:
List<listAreas> _listAreas = new List<listAreas>(); FilteredElementCollector topographyElement = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Topography); foreach (var VARIABLE in topographyElement) { var topoElement = doc.GetElement(VARIABLE.Id);// as TopographySurface; var area = topoElement.get_Parameter(BuiltInParameter.SURFACE_AREA).AsDouble(); double areaInMeters = UnitUtils.ConvertFromInternalUnits(area, DisplayUnitType.DUT_SQUARE_METERS); }
I have tried to use the TopographySurface Class, but I got the same result.
Does anyone know why the values are not the same? Does this take into account the surface of the lateral faces?
And in that case how could I take these surfaces areas or only the top surface area?
I have tried to take them in the following way (shown in the following code), but it is empty
FilteredElementCollector topographySurface = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_TopographySurface);
Thank you and best regards
Lorena
Solved! Go to Solution.