I know how to use "overlap" in Autocad & I already readed a theme
(Help - Select duplicate entities) but it still can't solve my problem.
Is any lisp that can select overlapping block & entities(line&pline&circle) and put all overlapping entities in other layer at the same time?
example-try to select red entities and put them in other layer at the same time.
example.dwg
i think your drawing objects not overlap in same position actually (there 2 different blocks)
maybe you can try command: qselect ?
then filter by layers, color etc..
Dear hanhphuc-- Thanks for your reply, actually I have a design and need use many different blocks inside but how can I find overlapping different blocks?
(I just put 2 different blocks in my example actually I need to put over 10 different blocks in my design and it real very different find overlapping different blocks:oops:)
though you can try qselect filter by Name,
this is isolate method which by fitering block name, you still have to manually test due to i'm not sure which type block you want to keep or erase
command: test
;invoke program then
pick any reference block entity, it will hide the matched name blocks.
the leftover maybe the overlaps. *mark with red circle (optional).
(defun c:test1 (/ e e1 i typ ss [color="gray"]vs[/color]) [color="gray"] (setq vs '(nil (/ (getvar 'viewsize) (cadr (getvar 'screensize)))))[/color] ; *optional (if (and (setq e (entsel "\nSelect reference block.. ")) (setq e (car e) typ (cdr (assoc 2 (entget e))) ss (ssget ":L" (list '(0 . "INSERT")));(cons 2 name) ) ;_ end of setq ) ;_ end of and (repeat (setq i (sslength ss)) (setq e1 (ssname ss (setq i (1- i)))) (if (equal typ (cdr (assoc 2 (entget e1))) )(redraw e1 2)[color="red"](redraw e1 3)[/color] ;comment this if entmake circle [color="gray"];;; (entmake (list '(0 . "CIRCLE") ;*optional;;; '(8 . "highlight");;; '(62 . 1);;; (cons 40 (* (vs) 5.));;; (cons 10 (cdr (assoc 10 (entget e1))));;; ) ;_ end of list;;; ) ;_ end of entmake[/color]) ;_ end of if ) ;_ end of repeat ) ;_ end of if (princ) ) ;_ end of defun
Dear hanhphuc,
Thanks, overkill can't use for block.
Pls have a review the example2. There are many blocks in my DWG.
I want all blocks but there are two blocks overlapping(just like pink area)
how can I find this overlapping in this drawing quickly?
Please advise me, thanks thanks thanks:cry:
I hope that hanhphuc won't mind if I posted my attempt .
Be careful that this may delete the other block and not the required one and that's why I gave the user the chance to select blocks to see the changes clearly .
Just a normal filter for insertion points then hide if not overlap,
ie: the rest visible blocks are considered "overlap" ,you decide yourself to erase manually.