May 5, 2004 #1 Hmo Electrical Joined Nov 1, 2003 Messages 42 Location BE Hi, I'm searching for a lisproutines which copies the value off a selected attribute to a second (and/of more) selected attribute. Can anyone help me for this? Both of the attributes are visible of course. regards, HMO
Hi, I'm searching for a lisproutines which copies the value off a selected attribute to a second (and/of more) selected attribute. Can anyone help me for this? Both of the attributes are visible of course. regards, HMO
May 6, 2004 #2 CarlB Civil/Environmental Joined Jul 11, 2001 Messages 1,194 Location US Didn't find one but whipped one together, let me know how it works. (princ "\nType ATTR to start ") (defun c:attr () (setq att1 (car (nentsel "\nSelect attribute to copy: "))) (redraw att1 3) (setq Att1val (cdr (assoc 1 (entget att1)))) (princ (strcat "\nSelected value is " Att1val)) (while (setq attpick (car (nentsel "\nSelect attribute to replace: "))) (setq attdata (entget attpick)) (setq attval (assoc 1 attdata)) (setq InsertName (cdr (assoc 330 attdata))) (setq Newdata (subst (cons 1 Att1val) attval attdata)) (entmod NewData) (entupd InsertName) );while (redraw att1 4) (princ) );defun Upvote 0 Downvote
Didn't find one but whipped one together, let me know how it works. (princ "\nType ATTR to start ") (defun c:attr () (setq att1 (car (nentsel "\nSelect attribute to copy: "))) (redraw att1 3) (setq Att1val (cdr (assoc 1 (entget att1)))) (princ (strcat "\nSelected value is " Att1val)) (while (setq attpick (car (nentsel "\nSelect attribute to replace: "))) (setq attdata (entget attpick)) (setq attval (assoc 1 attdata)) (setq InsertName (cdr (assoc 330 attdata))) (setq Newdata (subst (cons 1 Att1val) attval attdata)) (entmod NewData) (entupd InsertName) );while (redraw att1 4) (princ) );defun
May 7, 2004 Thread starter #3 Hmo Electrical Joined Nov 1, 2003 Messages 42 Location BE Hi, the solution you've given me is correct. It works perfect. Is it now also possible that when you've selected an attribute with value "1" the first replacement attribute is "2" and the second "3". So when i have a startvalue "5" and i select the replacement attributes value it will be "6" and further on? regards HMO Upvote 0 Downvote
Hi, the solution you've given me is correct. It works perfect. Is it now also possible that when you've selected an attribute with value "1" the first replacement attribute is "2" and the second "3". So when i have a startvalue "5" and i select the replacement attributes value it will be "6" and further on? regards HMO
May 12, 2004 #4 SRO Structural Joined Dec 27, 2001 Messages 104 Location US It there a way to do this with a block with more than one attribute, like a title block? Upvote 0 Downvote