amb2301 Posted July 16, 2020 Posted July 16, 2020 (edited) Hi Friends, I Have a task to Highlight the Non-Duplicated Text.... Actually i have 2 seperate drawings.....almost both contains the same Texts.... Here i need to Highlight the Non-Duplicated text by comparing these 2 drawings..... i tried to merge both the drawings & tried using command Burst, Overkill & Tspaceinvaders but its not happening... if anybody can help me out with lisp, it will be a great help for me. Attached both drawings, in Drawing2.dwg i have marked the Non-duplicated area in Red for reference. Thanks in Advance. Edited July 21, 2020 by amb2301 Quote
ronjonp Posted July 16, 2020 Posted July 16, 2020 Look into the COMPARE command .. assuming you have a later version of AutoCAD. Quote
amb2301 Posted July 16, 2020 Author Posted July 16, 2020 (edited) Hi @ronjonp, Firstly Thanks for looking on my request, Actually i have Autocad 2014 & compare command is not working for me ...is there any other way to use this compare command in my Autocad, please suggest me. Thanks. Edited July 16, 2020 by amb2301 Quote
devitg Posted July 16, 2020 Posted July 16, 2020 12 hours ago, amb2301 said: Hi Friends, I Have a task to Highlight the Non-Duplicated Text.... Actually i have 2 seperate drawings.....almost both contains the same Texts.... Here i need to Highlight the Non-Duplicated text by comparing these 2 drawings..... i tried to merge both the drawings & tried using command Burst, Overkill & Tspaceinvaders but its not happening... if anybody can help me out with lisp, it will be a great help for me. Attached both drawings, in Drawing2.dwg i have marked the Non-duplicated area in Red for reference. Thanks in Advance. Drawing1.dwg 1.26 MB · 2 downloads Drawing2.dwg 1.26 MB · 2 downloads Please clear it. You mean to Highlight the non duplicate text at dwg2. Guess get all text at dwg1, check versus all text at dwg2, and note the unequal at dwg1. As to say: dw1 have a b c d text, and dw2 have a b c d f , so f shall be highlighted at dwg2 Quote
amb2301 Posted July 16, 2020 Author Posted July 16, 2020 hi @devitg Thanks for looking on my post Yes Non-duplicated texts has to be higlighted, & i m Bursting all the drawing, so no need of block references in the drawing. yes as you have mentioned ......(dw1 have a b c d text, and dw2 have a b c d f , so f shall be highlighted at dwg2) ........ f has to be highlighted. Thanks in Advance. Quote
devitg Posted July 17, 2020 Posted July 17, 2020 2 hours ago, amb2301 said: hi @devitg Thanks for looking on my post Yes Non-duplicated texts has to be higlighted, & i m Bursting all the drawing, so no need of block references in the drawing. yes as you have mentioned ......(dw1 have a b c d text, and dw2 have a b c d f , so f shall be highlighted at dwg2) ........ f has to be highlighted. Thanks in Advance. But you will burst after the UNIQUE text is highlighted, or before. Quote
amb2301 Posted July 17, 2020 Author Posted July 17, 2020 5 hours ago, devitg said: But you will burst after the UNIQUE text is highlighted, or before. i am bursting before itself as of now, if it is possible to do without bursting also i am okay with it. i just need to findout the non-duplicated attributes. Quote
ronjonp Posted July 17, 2020 Posted July 17, 2020 Try this .. you'll need to copy drawing1 into drawing2 and burst. (defun c:foo (/ a b f ll mp s ur) ;; RJP » 2020-07-17 ;; Looks for text items that are not duplicates (cond ((setq s (ssget "_X" '((0 . "*TEXT") (410 . "Model")))) (setq a (vlax-get-acad-object)) (foreach x (mapcar 'cadr (ssnamex s)) (vla-getboundingbox (vlax-ename->vla-object x) 'll 'ur) (mapcar 'set '(ll ur) (mapcar 'vlax-safearray->list (list ll ur))) (setq mp (polar ll (angle ll ur) (/ (distance ll ur) 2.))) (vlax-invoke a 'zoomwindow ll ur) (setq f (vl-remove-if-not '(lambda (x) (vl-position (car x) '(0 1))) (entget x))) (and (setq b (ssget "_C" ll ur f)) (= 1 (sslength b)) ;; Create a pointer from 0,0,0 to show non duplicated text (entmakex (list '(0 . "LINE") '(10 0. 0. 0.) (cons 11 mp) '(8 . "UniqueText"))) ;; Make text RED (entmod (append (entget x) '((62 . 1)))) ) ) ) ) (princ) ) (vl-load-com) Quote
devitg Posted July 17, 2020 Posted July 17, 2020 15 hours ago, amb2301 said: hi @devitg Thanks for looking on my post Yes Non-duplicated texts has to be higlighted, & i m Bursting all the drawing, so no need of block references in the drawing. yes as you have mentioned ......(dw1 have a b c d text, and dw2 have a b c d f , so f shall be highlighted at dwg2) ........ f has to be highlighted. Thanks in Advance. But you will burst after the UNIQUE text is highlighted, or before. Hi , as I can see Drawing1 have 481 TEXT and MTEXT , and DWG2 have 474 TEXT and MTEXT We should know that text are at model , but ATT are at the BLOCK , Up now I do not know if you need to check TEXT and MTEXT only , or also TEXT at the attribute. Or do the check AFTER you burst all . Quote
amb2301 Posted July 17, 2020 Author Posted July 17, 2020 (edited) On 7/17/2020 at 9:05 PM, ronjonp said: Try this .. you'll need to copy drawing1 into drawing2 and burst. (defun c:foo (/ a b f ll mp s ur) ;; RJP » 2020-07-17 ;; Looks for text items that are not duplicates (cond ((setq s (ssget "_X" '((0 . "*TEXT") (410 . "Model")))) (setq a (vlax-get-acad-object)) (foreach x (mapcar 'cadr (ssnamex s)) (vla-getboundingbox (vlax-ename->vla-object x) 'll 'ur) (mapcar 'set '(ll ur) (mapcar 'vlax-safearray->list (list ll ur))) (setq mp (polar ll (angle ll ur) (/ (distance ll ur) 2.))) (vlax-invoke a 'zoomwindow ll ur) (setq f (vl-remove-if-not '(lambda (x) (vl-position (car x) '(0 1))) (entget x))) (and (setq b (ssget "_C" ll ur f)) (= 1 (sslength b)) ;; Create a pointer from 0,0,0 to show non duplicated text (entmakex (list '(0 . "LINE") '(10 0. 0. 0.) (cons 11 mp) '(8 . "UniqueText"))) ;; Make text RED (entmod (append (entget x) '((62 . 1)))) ) ) ) ) (princ) ) (vl-load-com) Hi @ronjonp Thank you so much for your help First i copied Drawing1 & pasted over Drawing2 & using command BURST, bursted all... then i run the command FOO, after that i got error as " ; error: Automation Error. Null extents " & getting stopped. i have attached screenshot. Edited July 22, 2020 by amb2301 Quote
amb2301 Posted July 17, 2020 Author Posted July 17, 2020 (edited) Now i tried working like.....before BURST, i manually deleted all the Block attributes ( H: T: E: A:) Shown in above screenshot...then i Bursted the drawing & run the FOO command, it worked fine ....& shown up all the Non-Duplicated Actually the problem is in the Block Attribute Edited July 22, 2020 by amb2301 check Quote
amb2301 Posted July 17, 2020 Author Posted July 17, 2020 (edited) On 7/17/2020 at 10:04 PM, devitg said: But you will burst after the UNIQUE text is highlighted, or before. Hi , as I can see Drawing1 have 481 TEXT and MTEXT , and DWG2 have 474 TEXT and MTEXT We should know that text are at model , but ATT are at the BLOCK , Up now I do not know if you need to check TEXT and MTEXT only , or also TEXT at the attribute. Or do the check AFTER you burst all . Actually i do check after burst all Edited July 21, 2020 by amb2301 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.