Like This?
;;; FUNCTION
;;; This routine will rename all layout tabs with
;;; user entered prefix & number or letter suffix
;;;
;;; ARGUMENTS
;;; none
;;;
;;; USAGE
;;; re-name-layouts
;;;
;;; PLATFORMS
;;; 2000+
;;;
;;; AUTHOR
;;; Copyright© 2004 Charles Alan Butler
;;; ab2draft@TampaBay.rr.com
;;;
;;; VERSION
;;; 1.0 Oct. 01, 2004
;;; 2.0 Nov. 09, 2004
;;;
;;; This software is provided "as is" without express or implied ;
;;; warranty. All implied warranties of fitness for any particular ;
;;; purpose and of merchantability are hereby disclaimed. ;
;;; You are hereby granted permission to use, copy and modify this ;
;;; software without charge, provided you do so exclusively for ;
;;; your own use or for use by others in your organization in the ;
;;; performance of their normal duties, and provided further that ;
;;; the above copyright notice appears in all copies and both that ;
;;; copyright notice and the limited warranty and restricted rights ;
;;; notice appear in all supporting documentation. ;
;;;
(defun c:re-name-layouts (/ tab_name doc cnt x suffix new_list excludechr
excludetab)
(vl-load-com)
(setq excludechr "~"
excludetab T)
(setq tab_name (getstring t "\nEnter Tab Name prefix (add trailing space): "))
(cond (tab_name) ((setq tab_name "")))
(initget "Numbers Letters")
(setq suffix (getkword "\nSuffix to use? [Numbers or Letters] : <Numbers> "))
(cond (suffix) ((setq suffix "Numbers")))
(setq *doc* (vla-get-activedocument (vlax-get-acad-object)))
(vlax-for tab (vla-get-layouts ; get list of layout tabs
(vla-get-activedocument (vlax-get-acad-object)))
(if (/= (setq tmpname (vla-get-name tab)) "Model") ; omit MODEL space
(setq new_list (cons (cons (vla-get-taborder tab) tab) new_list))
)
)
;; sort list acording to tab order
(setq new_list (vl-sort new_list
'(lambda (e1 e2) (< (car e1) (car e2)))))
;;remove the taborder numbers
(setq new_list (mapcar 'cdr new_list))
;; rename the tabs
(setq cnt (cond ((= suffix "Numbers") 0) (64)))
(foreach x new_list
(if (not (and excludetab (vl-string-search excludechr (vla-get-name x))))
(vla-put-name x
(strcat tab_name
(cond
((= suffix "Numbers")
(itoa (setq cnt (1+ cnt))))
((chr (setq cnt (1+ cnt))))
))))
)
(princ)
) ; defun
(prompt "\n*-* Rename Tab layouts Loaded, Enter re-name-layouts to run. *-*")
(princ)