In the Revit API, how can I mark the clash intersection area with a rectangle?

In the Revit API, how can I mark the clash intersection area with a rectangle?

praveen.cMXB2H
Enthusiast Enthusiast
657 Views
4 Replies
Message 1 of 5

In the Revit API, how can I mark the clash intersection area with a rectangle?

praveen.cMXB2H
Enthusiast
Enthusiast

In the Revit API, I need to develop a script or application that identifies clash intersection areas and marks them with rectangles. Specifically, I'm looking for guidance on how to programmatically create rectangles to highlight these clash regions within the Revit environment.

 

praveencMXB2H_0-1700544632565.png

The beam is clashing with the column here.

praveencMXB2H_1-1700544756284.jpeg

 

In this scenario, the beam clashes with the column, and I need to visually represent the clash area, possibly using rectangles.

0 Likes
658 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni

I think you should spend some time on researching optimal workflows and best practices for this kind of task manually through the end user interface before thinking about addressing it programmatically. You have so many options in Revit to affect the view representation of individual elements or areas, and you should make optimal use of  those.

  

For instance, you can change the colour of individual elements in individual views to indicate that two elements clash. You can create individual views that display only clashing elements. There are almost infinite possibilities, and I am sure that others have already invested a lot of time and effort in researching the best presentation methods.

  

I doubt that simply drawing rectangles around the areas of interest is the optimal way. That said, though, you can certainly draw view-specific rectangles highlighting clashes using detail curves, just like your image suggests.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 5

praveen.cMXB2H
Enthusiast
Enthusiast

I am able to highlight the two complete elements that are intersecting with any color, but my goal is to highlight only the intersection area. Additionally, I can currently display only one element and hide all the others, but my requirement is not just to draw the rectangle; rather, I need that specific part to be highlighted, which would be very helpful for my project.

0 Likes
Message 4 of 5

Mohamed_Arshad
Advisor
Advisor

HI @praveen.cMXB2H 


There are several methods to show the intersection area

1. Get the Intersection Geometry and create a Direct Shape and change its color (To Show the Exact Area as rectangle).

2. Create a Sphere family, get the center point of the intersection and place the family over there (Intersection Point).

 

I hope this two will help you 🙂


Mohamed Arshad K
Software Developer (CAD & BIM)

0 Likes
Message 5 of 5

praveen.cMXB2H
Enthusiast
Enthusiast

Hi Arshad, 

Can you provide any sample code or links.

0 Likes