Hey,
Im new to lisp and am trying to rename the layout tab and prefix the letter 'R' in front of the revision attribute that is being read in the block
So if the revision is A it will then rename the layout tab to RA
This is what i have so far have done some research but canot find an answer
am unsure on how to prefix the letter R
attached is the title block attribute
(defun c:layName (/ bNme aNme lay ss att e)
(vl-load-com)
(setq bNme "GHD_G_1002_T" aNme "GHD_REV_NO")
(vlax-for lay (vla-get-layouts
(vla-get-ActiveDocument (vlax-get-acad-object)))
(if (and (not (eq "MODEL" (strcase (vla-get-Name lay))))
(setq ss (ssget "_X" (list (cons 0 "INSERT")
(cons 2 bNme)
(cons 66 1)
(cons 410 (vla-get-Name lay))))))
(foreach att (vlax-invoke
(vlax-ename->vla-object (ssname ss 0)) 'GetAttributes)
(if (apply 'eq (mapcar 'strcase (list aNme (vla-get-TagString att))))
(if (vl-catch-all-error-p
(setq e (vl-catch-all-apply 'vla-put-Name
(list lay (vla-get-TextString att)))))
(princ (strcat "\n** Error: " (vl-catch-all-error-message e) " **")))))))
(princ))