LISP <--> Attributes
LISP <--> Attributes
(OP)
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
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





RE: LISP <--> Attributes
(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
RE: LISP <--> Attributes
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
RE: LISP <--> Attributes