ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

intersect many Entity ...

2 REPLIES 2
Reply
Message 1 of 3
leonimas
367 Views, 2 Replies

intersect many Entity ...

Hi to all,

there is a method to detect if a line (from pt1 to pt2) intersects some AcDbEntities ?

To use intersectWith() I must know a pair of object ...

 

Many Thanks

Leonard

2 REPLIES 2
Message 2 of 3
Balaji_Ram
in reply to: leonimas

Hi Leonard,

 

AutoCAD API does not provide such direct method.

 

You can use the extents of the line entity and identify the entities in the drawing using it as a crossing window.

 

Iterate the list of entities and use the IntersectWith to further identify which ones actually intersect with the line.

 

Regards,

Balaji



Balaji
Developer Technical Services
Autodesk Developer Network

Message 3 of 3
tbrammer
in reply to: leonimas

You might want to do something like the "fence selection" in AutoCAD.

This can be done with acedSSGet(_T("_F"), pts, NULL, NULL, ss). See docs.

Or acedCommand(RTSTR, _T("_select"), RTSTR, _T("_F"), RTNONE);

 

Be aware that you will find all entities that "visually" intersect with the projection of your line.

 

--Thomas


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

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

Post to forums  

Autodesk Design & Make Report

”Boost