Alternative of ReferenceIntersector (its slow) for raycasting in Revit API
Not applicable
04-13-2020
05:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am doing raycasting using below code.
ReferenceIntersector intersector = new ReferenceIntersector(uidoc.ActiveView as View3D);
IList<ReferenceWithContext> references = intersector.Find(point1, point2 - point1);
foreach (ReferenceWithContext reference in references)
{
ElementId id = reference.GetReference().ElementId;
}
It takes around 13 seconds to do around 10,000 ray casting in this situation.
Is there any efficient way to do ray casting in Revit API.
Are there any alternatives of ReferenceIntersector?
Link copied