- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
Short Story:
How can I find the material of the face found by ReferenceIntersector..??
Long Story:
I'm using a ray (ReferenceIntersector) to find intersecting elements, this works out great!
It returned a 'List(Of ReferenceWithContext)' that provides me information of intersection (.GetReference.GlobalPoint) and element (.GetReference.ElementId)
Even thru I used the .TargetType = FindReferenceTarget.Face, it's returns the ElementId's of the Revit elements, not the face.
An element (by example a Window) can contain many faces.
How can I find the material of the face found by ReferenceIntersector..??
This is one of the things I tryed: (type conversion from reference to face, because a face has a material)
If MyReferenceWithContext.GetReference.ElementReferenceType = ElementReferenceType.REFERENCE_TYPE_SURFACE Then
Dim MyFace As Face = TryCast(MyReferenceWithContext.GetReference, Face)
MsgBox(MyFace.MaterialElementId.IntegerValue.ToString)
End If
Thanks,
Chris Hanschen
The Netherlands
Solved! Go to Solution.