Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66692

Re: How to Get the geometry of family which the curtain wall belong?

$
0
0

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


Viewing all articles
Browse latest Browse all 66692

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>