Can somebody suggest identifying overlapping text with objects in a different layer
What about the OVERKILL command , did you try it ?
@Anonymous wrote:Can somebody suggest identifying overlapping text with objects in a different layer
That is a strange code. Select on screen, then only if theres two object selected it will change the color and move the other one down . but in your case , all you wwant to is change the layer of the "overlap text".
What constitue an overlap? Exact duplicate of the TEXT entity? i.e string/insertion point/ layer......
Is there a tool or a lisp to identify the following overlaps in a different layer color for identification purpose (Not deleting the duplicates' by an Overkill command) in a shop drawing using an entire window slection :-
1. Text with text overlap
2. Text and object overlap
@Anonymous wrote:Is there a tool or a lisp to identify the following overlaps in a different layer color for identification purpose (Not deleting the duplicates' by an Overkill command) in a shop drawing using an entire window slection :-
1. Text with text overlap
2. Text and object overlap
Wow.... That could be daunting. The first thing that comes to mind is to find the bounding boxes of things and check whether any of their corners fall within the bounding boxes of other things. That probably isn't too hard as an individual comparison, but you would have to check every single object against every other single object. That could add up to a whole lot of comparisons. And iffy possibilities come to mind -- for instance, in the attached image, would you consider the red Text object to "overlap" the yellow Line? Their bounding boxes [blue] do overlap, but not their "content". I guess there must be a way to determine whether the Line itself goes through the bounding box of the Text, but would the basis of comparison need to be something entirely different for different entity types? What would you check for an Arc? Etc., etc....
Hi Kent .. lets go for a particular case where we can identify text and object overlap.Is there a tool or a lisp.I am new to this issue.
Thanks and regards
Bireshwar
@Anonymous wrote:....lets go for a particular case where we can identify text and object overlap.Is there a tool or a lisp....
Try putting overlap into the Search window. A bunch of threads come up, some of which may have what you're after. If they don't, I think the first order of business is to define exactly what constitutes "overlap" for your purposes [e.g. in my earlier image, do the Text and Line overlap?].
Morning Kent!! yes in your attached image the line box and the text box do overlap.But what I am seeking is a tool that can resolve the cases that I have attached showing basic cases of overlaps in CAD shopdrawings.
Thanks and good wishes
@Anonymous wrote:....what I am seeking is a tool that can resolve the cases that I have attached showing basic cases of overlaps in CAD shopdrawings.
....
As a starting point [requiring User selection of two objects, but the principle can be applied to any two, determined by whatever means], the following seems to identify the overlap in all the situations in your example:
(defun C:Overlap (/ o1 o2)
(vl-load-com)
(setq
o1 (vlax-ename->vla-object (car (entsel "\nSelect first object: ")))
o2 (vlax-ename->vla-object (car (entsel "\nSelect second object: ")))
); setq
(prompt
(strcat
"\nThose two objects "
(if
(safearray-value (variant-value (vla-intersectwith o1 o2 acExtendNone)))
"DO"
"do NOT"
); if
" overlap."
); strcat
); prompt
(princ)
); defun
HOWEVER, it does not catch everything you might want to catch, and it might identify some things you wouldn't consider overlaps.
In the attached image, if we look only at bounding-box overlap as was my first thought, all of the white objects would be considered to overlap all of the other white objects.
The above code doesn't consider any of them to overlap except that it claims the Dimension overlaps the Line and the Circle, so in terms of the IntersectWith method, apparently Dimensions are considered in terms of their bounding boxes. But only their bounding boxes' edges -- it doesn't consider the Dimension to overlap the white Text or the Leader, even though [or, because] they're fully inside its bounding box perimeter. But if you move that Text or Leader down so that its bottom reaches the level of the left definition point of the Dimension, it does say they overlap, even though they're farther from what I would consider overlapping than they were before.
Similarly, it doesn't consider the green Text to overlap either the red Text or the yellow Line, because the edges of their bounding boxes don't cross each other, even though one is fully inside the other, which I would consider overlapping. [It does say the yellow Line overlaps the red Text.] Likewise, a Line fully inside a Circle is not considered to overlap, etc.
Another quirk is that with a Leader, IntersectWith seems to consider only the linear path, but not the arrowhead. If I move the Text so that part of it extends into the arrowhead but not as far as the "line" part within that, the code doesn't consider them to overlap.
So I think to be conclusive, it will require something like this:
A) Compare with the IntersectWith method above. If that says they overlap, it seems they really do, except sometimes in the case of Dimensions that to some degree "wrap around" the extent of other objects.
B) If that doesn't say they overlap, get their bounding boxes, determine which is smaller, and check whether all four of its corners lies inside the larger bounding box. [You don't want to check whether just any corner lies within, or a lot of the white objects in the attached would be considered to overlap.] Again, that could sometimes give a false reading with a Dimension [it would consider the Dimension and the white Text or Leader to overlap in the attached].
C) If one of them is a Dimension or a Leader, some other kind of analysis could be required, but I'm having a hard time figuring out what that would be....
Anyway, do you think this is headed in the right direction?
don't forget the command TSPACEINVADERS...
http://autocadtips.wordpress.com/2010/12/03/tspaceinvaders/
~Greg
Yea greg thanks a lot!! I had already used this command and made a tool bar corresponding to it.This command does gives a selection set of all overlapped objects that we can put it in a separate layer as well we can zoom into particular entity for each overlap.
Thanks and regards,
Bireshwar
Can't find what you're looking for? Ask the community or share your knowledge.