Topography Area Surface and Projected Area

Topography Area Surface and Projected Area

Anonymous
Not applicable
1,671 Views
3 Replies
Message 1 of 4

Topography Area Surface and Projected Area

Anonymous
Not applicable

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.

 

Revit Surface area.PNG

 

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);

TopographySurface.PNG 

Thank you and best regards

 

Lorena

 

0 Likes
Accepted solutions (1)
1,672 Views
3 Replies
Replies (3)
Message 2 of 4

recepagah12
Advocate
Advocate
Accepted solution

I tried the same thing what you did and I get the true value. Except I select the topography with the user interface. As you did, I tried the code in Autodesk Revit Architecture Sample and it worked. Did you check the values via Revit LookUp tool? 

 

I hope this helps,

Recep.

0 Likes
Message 3 of 4

Anonymous
Not applicable


It works, I don't understand the difference between the two, but it's working.
Thank you very much!!!!
Regarding LookUp tool, I have never used it, I check the results in visual basic directly. Do you think LookUp is better?

0 Likes
Message 4 of 4

recepagah12
Advocate
Advocate
I don't know either the difference between projected surface area and
surface area. But for everything related to Revit API, Revit LookUp is a
great tool. You can obtain almost every information in Revit UI without add
extra code. Beside getting values you can learn how to obtain parameters
ans if it is changable or not. Revit LooukUp is a have to tool for a Revit
API developer. Thanks very much to Jeremy Tammik for this great tool. You
can install this tool from github or in Boost Your BIM, you can install one
click install tool.
0 Likes