narendra Posted November 4, 2014 Share Posted November 4, 2014 some body help me to change this to match text not attibutes ;(princ "\nType MTB to Run") (defun C:MTB (/) (setq baselist (list)) (setq ename (car (entsel "\nSelect Block:"))) (while (= ename nil) (princ "\nNothing Picked") (setq ename (car (entsel "\nSelect Block:"))) );end while (setq ename1 (car (entsel "\nSelect Block To Apply Changes:"))) (while (= ename1 nil) (princ "\nNothing Picked") (setq ename1 (car (entsel "\nSelect Block To Apply Changes:"))) );end while (setq ename (entnext ename)) (setq elist (entget ename)) ;the entity list of the base border (setq etype (cdr (assoc 0 elist))) ;should be attrib (while (= etype "ATTRIB") ;puts all the attribute in a list (setq tag (cdr (assoc 2 elist))) ;the attribute tag (setq val (cdr (assoc 1 elist)));the attribute value (setq baselist (append (list (list tag val)) baselist));put the attribute in list (setq ename (entnext ename)) ;move onto the next attribute (setq elist (entget ename)) (setq etype (cdr (assoc 0 elist))) );end while (setq ename1 (entnext ename1)) ;get the next entity, should be "ATTRIB" (setq elist1 (entget ename1)) ;the entity list of the border (setq etype1 (cdr (assoc 0 elist1))) ;should be attrib (while (= etype1 "ATTRIB") (setq attval nil) (setq tag (cdr (assoc 2 elist1)));the attribute tag (foreach item baselist (if (= tag (nth 0 item)) (progn (setq attval (nth 1 item)) );end then (progn);else do nothing go to next in list till tag matches );end if );end foreach mtb.lsp Quote Link to comment Share on other sites More sharing options...
Tharwat Posted November 4, 2014 Share Posted November 4, 2014 More information is needed . Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 4, 2014 Share Posted November 4, 2014 You could try my Copy or Swap Text program; or alternatively, my Match Text Properties program and uncomment the 'TextString' property on line 36. Lee Quote Link to comment Share on other sites More sharing options...
narendra Posted November 4, 2014 Author Share Posted November 4, 2014 thank you lee mac.........this is what I need......thank you very much Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 4, 2014 Share Posted November 4, 2014 You're very welcome narendra. Quote Link to comment Share on other sites More sharing options...
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.