Ray lunching

avishagber
Community Visitor
Community Visitor

Ray lunching

avishagber
Community Visitor
Community Visitor

Hey everyone,
I am using ReferenceIntersector FindNearest method, whan i am "Hitting" a wall i get the excpected reference and location. but whan i am "Hitting" a window the ray is passing thorow the window.
Any idea what the reason is?
//creating a list of category
IList<BuiltInCategory> categories = new List<BuiltInCategory>();
categories.Add(BuiltInCategory.OST_Walls);
categories.Add(BuiltInCategory.OST_Doors);
//Creating new elmentcatgory filter
ElementMulticategoryFilter filter = new ElementMulticategoryFilter(categories);

//getting the reference
ReferenceIntersector refI = new ReferenceIntersector(filter, FindReferenceTarget.All, view3d);
ReferenceWithContext refC = refI.FindNearest(lunchingLocation, rayDiraction);

0 Likes
Reply
137 Views
1 Reply
Reply (1)

jeremy_tammik
Autodesk
Autodesk

Good appetite lunching on rays!

 

I hope you got a bunch of nice fresh crunchy ones.

 

You are specifying the walls and doors categories, and then wondering why windows are not considered?

 

That seems kind of weird to me.

 

I would suggest two things:

  

  • Use a spell checker when typing
  • Add the windows category to your filter

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open