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