How to select connected objects

How to select connected objects

alexandrescoelho
Enthusiast Enthusiast
1,650 Views
2 Replies
Message 1 of 3

How to select connected objects

alexandrescoelho
Enthusiast
Enthusiast

Hi,

 

I need to select a sequence of object connected to the first one. In selection tree I can see all "groups" of objects like as shown in attached pictures just by clicking in the model.

 

What I really need is find out which is the next object connected starting from a given object using the API. The Selection tree is not ordered, so I it means that I can´t find the next object just looking for next element or the deepper element in the tree.

 

I have tried to match elements arround using initial object boundary (GetBoundingBox method) but it´s not working.

 

Any idea is very appreciated

 

Best regards

 

 

0 Likes
Accepted solutions (1)
1,651 Views
2 Replies
Replies (2)
Message 2 of 3

xiaodong_liang
Autodesk Support
Autodesk Support
Accepted solution
Hi,

sorry, there is not API way. Once the model is loaded into Navisworks, they are triangles only. If you are familiar with graphics algorithm, you could try to get the connected body by the triangles, but this will be complex.

generally, I would suggest to store the information in the source CAD model. This you can easily get out the info. In the source CAD tool such as Revit, I think it is possible to write a bath job to iterate the elements to find out their connecting elements, then store the info as a property

bounding box is orthogonal along XYZ. obviously it cannot be a way to check the connected elements if the elements are positioned with rotations.
0 Likes
Message 3 of 3

alexandrescoelho
Enthusiast
Enthusiast
Ok, thank you for your response. I will search for another way to solve
this problem using what you syggested.

Best regards

Alexandre S. Coelho
0 Likes