Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello!
How pick only side face of wall by revit api?
I use code:
Public Sub SelectPlanarFaces(document As Autodesk.Revit.DB.Document) Dim uidoc As New UIDocument(document) Dim selFilter As ISelectionFilter = New PlanarFacesSelectionFilter(document) Dim faces As IList(Of Reference) = uidoc.Selection.PickObjects(ObjectType.Face, selFilter, "Select multiple planar faces") End Sub Public Class PlanarFacesSelectionFilter Implements ISelectionFilter Private doc As Document = Nothing Public Sub New(document As Document) doc = document End Sub Public Function AllowElement(element As Element) As Boolean Implements ISelectionFilter.AllowElement Return True End Function Public Function AllowReference(refer As Reference, point As XYZ) As Boolean Implements ISelectionFilter.AllowReference If TypeOf doc.GetElement(refer).GetGeometryObjectFromReference(refer) Is PlanarFace Then ' Only return true for planar faces. Non-planar faces will not be selectable Return True End If Return False End Function End Class
What condition I must insert to function AllowReference for pick only side face?
Solved! Go to Solution.