It depends what you want to do with the information?
If you just want volumes, you should be able to use:
Dim materialIds As ICollection(Of DB.ElementId) = elem.GetMaterialIds(False) For Each materialId As DB.ElementId In materialIds Dim volume As Double = 0.0 If Not materialId.Equals(DB.ElementId.InvalidElementId) Then volume = elem.GetMaterialVolume(materialId) End If Next
If you want the material of a particular part of the element, you'll need to cycle through the GeometryElement parts to get the solids, and from the solids get the faces, and from the faces get the material. Check out TBC for an example: http://thebuildingcoder.typepad.com/blog/2008/10/family-instance-materials.html