For *any* object type(s), with obj1 and obj2 being their entity names, if they are in the same plane, this will tell whether they intersect:
{code}
(if
(safearray-value
(variant-value
(vla-intersectwith
(vlax-ename->vla-object obj1)
(vlax-ename->vla-object obj2)
acExtendNone
); end vla-intersectwith
); end variant-value
); end safearray-value
(alert "\nObjects intersect."); then
(alert "\nObjects do not intersect."); else
); end if
{code}
However, that will also say that they intersect if they only *touch* each other, without any overlapping area.
If the return of (safearray-value) contains three numbers, representing the XYZ coordinates of one intersecting point, then if the objects are closed Polylines, they only touch, most likely at a common vertex, but do not have a common area.
But even if that returns more than three numbers, representing multiple intersection points, it doesn't necessarily mean that they overlap; they could have coincident edges without any overlapping area. It may well be possible, though I think it would be complicated, to determine whether there is any actual overlap.
Also, if one is completely inside the other, without touching it, the above would say they do not intersect, but would not know that they have a common area.
--
Kent Cooper
salman_nsr wrote...
....how can I find if two polylines intersect and have a common area.
Kent Cooper, AIA