I'm having problems getting this routine to work. The code should allow the user to select two attribute values from the same block then copy those values in a string to some test. For some reason I can not get it to work correctly. For example the user should be able to pick "PIT" then
"100" from the same block and paste a value of "I-PIT100" into the text. Any help would be greatly appreciated.
Code:
(defun c:cblnum ()
(setq x (car(nentsel "\n Select The First Attribute Value :")))
(setq y (car(nentsel "\n Select The Second Attribute Value :")))
(setq ss(car(entsel "\n Select Text :")))
(setq att1(assoc 1 (entget x)))
(setq att2(assoc 1 (entget y)))
(setq stii(strcat (substr "I-" 1 2)(substr att1 1)(substr att2 1)))
(entmod (subst stii (assoc 1 (entget ss)) (entget ss)))
(princ)
)