Method GetMaterialArea() appears to use different formulas for computing the area depending on the element category.

Method GetMaterialArea() appears to use different formulas for computing the area depending on the element category.

kilian_speiser
Observer Observer
710 Views
4 Replies
Message 1 of 5

Method GetMaterialArea() appears to use different formulas for computing the area depending on the element category.

kilian_speiser
Observer
Observer

Hello,

I am using the method GetMaterialArea form Autodesk.Revit.DB.Element. unfortunately, it is unclear how the method calculates the areas and what...

  1. For a wall it is the area of one of the side faces for a layer (which probably makes sense)
  2. For a window, however, the method returns the sum over all 6 faces (assuming a simple cuboid.

It would be nice to 

  • either have a documentation on how the method functions on different elements
  • or have a unified way of computing the area. 

 

Can anyone provide more insight on how it works?

 

Thanks,

0 Likes
711 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni

Thank you for the interesting observation and pertinent question. I asked the development team for you.,

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 5

kilian_speiser
Observer
Observer

I also noticed that GetMaterialIds returns null for elements of (at least) these categories:

Pipe, Flex Pipe, Duct, Flex Duct, Duct Insulation, Ramp

 

GetMaterialArea(matId) and GetMaterialVolume(matId) returns 0 for these categories.

0 Likes
Message 4 of 5

RPTHOMAS108
Mentor
Mentor

You should check Category.HasMaterialQuantities for that, some categories don't support material quantities.

 

Regarding the other thing I'm waiting to hear in slightly more detail also. However it is noted that such material quantities are calculated either from compound structure layers or geometry. Since the Window isn't a compound structure area will be taken from faces of geometry I suspect (Wall on the other hand has compound structure). The geometry of the wall would at the same time be lacking the layers detail.

0 Likes
Message 5 of 5

jeremy_tammik
Alumni
Alumni

The development team reply:

 

I think the customer is referring mostly to the difference between system families and loaded families in Revit itself. The API is probably returning the same values.

  

  • Hosts will return 1 face, because in construction, you would refer to the area of a wall material (for example) as the area to be covered when looking at the wall.
  • Stairs, railing, ramps, site, and curtain wall also have special behavior.
  • Loaded families (like windows) will report an area including all faces.

  

This is confirmed and workarounds are posted in the Revit Clinic article on Material Takeoff Area Schedule.

Some other special cases are listed in the Autodesk Support article on Material Takeoff shows incorrect values of areas and/or volumes in Revit.

  

As far as the API goes, check out these 2 resources from The Building Coder and Scott Conover that may help confirm the API designed behavior:

  

 

This is from Scott's presentation: Material quantity extraction One common analytical requirement is to extract material quantities of elements in the document. Revit 2010 introduced methods to directly obtain the material volumes and areas computed by Revit for material takeoff schedules:

  

  • Element.Materials – obtains a list of materials within an element
  • Element.GetMaterialVolume() – obtains the volume of a particular material in an element
  • Element.GetMaterialArea() – obtains the area of a particular material in an element

 

The methods apply to categories of elements where Category.HasMaterialQuantities property is true. In practice, this is limited to elements that use compound structure, like walls, roofs, floors, ceilings, a few other basic 3D elements like stairs, plus 3D families where materials can be assigned to geometry of the family, like windows, doors, columns, MEP equipment and fixtures, and generic model families. Note that within these categories there are further restrictions about how material quantities can be extracted. For example, curtain walls and curtain roofs will not report any material quantities themselves; the materials used by these constructs can be extracted from the individual panel elements that make up the curtain system. Note that the volumes and areas computed by Revit may be approximate in some cases. For example, for individual layers within a wall, minor discrepancies might appear between the volumes visible in the model and those shown in the material takeoff schedule. These discrepancies tend to occur when you use the wall sweep tool to add a sweep or a reveal to a wall, or under certain join conditions.

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes