Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ray lunching

1 REPLY 1
Reply
Message 1 of 2
avishagber
127 Views, 1 Reply

Ray lunching

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);

1 REPLY 1
Message 2 of 2
jeremy_tammik
in reply to: avishagber

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community