Jump to content

Recommended Posts

Posted (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 by amb2301
Posted

Look into the COMPARE command .. assuming you have a later version of AutoCAD.

image.thumb.png.b107259295d888858690d43fbf700a39.png

Posted (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 by amb2301
Posted
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 

 

Posted

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.

 

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

 

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

Posted

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)

image.png.12ea735f27f7fc7be5f0570ac8823d7a.png

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

 

 

 

 

Posted (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 by amb2301
Posted (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 by amb2301
check
Posted (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 by amb2301

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...