tab renaming lisp

tab renaming lisp

dyed000
Community Visitor Community Visitor
266 Views
2 Replies
Message 1 of 3

tab renaming lisp

dyed000
Community Visitor
Community Visitor

hello
is there a lisp that; in a tab/layout, say arrange its name already.. suddenly like the last page have to moved to the middle, is there a way that it will automatically rename itself? or type the lisp like rename tab lisp? 
what i mean is as soon as you relocate the layout, it will automatically rename itself according to the sequence... 
thanks.

0 Likes
267 Views
2 Replies
Replies (2)
Message 2 of 3

paullimapa
Mentor
Mentor

check out Lee Mac's layout tab functions:

https://www.lee-mac.com/renumberlayouts.html

https://www.lee-mac.com/tabsort.html

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 3

Sea-Haven
Mentor
Mentor

Another 

(defun c:wow ( / laylst lays lay)
(setq laylst '())

(setq dname (cadr (fnsplitl (getvar 'dwgname ))))
(setq lays (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object))))
(vlax-for lay lays
(setq laylst (cons (list (vla-get-taborder lay) (vla-get-name lay)) laylst))
)

(foreach lay laylst
(if (= (car lay) 0)
(princ)
(command "layout" "R" (cadr lay) (strcat dname "D-" (rtos (car lay) 2 0)))
)
)
(princ)
)
(c:wow)
0 Likes