;; NUMLAY ;; Rinomina i layout con numeri o lettere in maniera crescente ;; 29-11-2016 - www.domenicoieva.com ;; (defun c:numlay ( / n lista ) (defun Layorder (/ order) (vlax-for la (vla-get-layouts (vla-get-ActiveDocument (vlax-get-acad-object)) ) (setq order(cons (list(vla-get-name la)(vla-get-taborder la)) order))) (mapcar 'car (Cdr (vl-sort order '(lambda (j k) (< (cadr j) (cadr k)) ) ) ) ) ) ;;;--------------------- (setvar"cmdecho"0) (vl-load-com) (setq n(getstring"\nNumero di partenza o lettera;")) (setq lista(layorder)) (foreach l lista (command "_layout" "_rename" l n) (setq n(chr(1+ (ascii n))) ) ) )