加载AutoLabelAttributesV1-0.lsp
;;-----------------=={ AutoLabel Attributes }==---------------;;
;; ;;
;; Automatically labels a specific attribute in a set of ;;
;; blocks, renumbering if blocks are added, copied or ;;
;; erased. ;;
;;------------------------------------------------------------;;
;; Author: Lee Mac, Copyright ?2011 - www.lee-mac.com ;;
;;------------------------------------------------------------;;
;; Version 1.0 - 14-09-2011 ;;
;;------------------------------------------------------------;;
;;------------------------------------------------------------;;
;; Settings ;;
;;------------------------------------------------------------;;
;; [Note: Block names and Attribute Tags are *not* case-sensitive]
(setq *blockname* "c1" ;; Name of Block to be Updated
*blocktag* "1" ;; Attribute Tag to be Updated
)
;;------------------------------------------------------------;;
;; Main Program ;;
;;------------------------------------------------------------;;
(defun ObjectReactorCallback:RenumberBlocks ( object reactor params )
(setq *reactor* reactor)
(vlr-command-reactor "temp" '((:vlr-commandended . CommandReactorCallback:RenumberBlocks)))
(vlr-remove reactor)
(princ)
)
;;------------------------------------------------------------;;
(defun CommandReactorCallback:RenumberBlocks ( reactor params / e f i l n s )
(if reactor (vlr-remove reactor))
(if
(and
(not *undoflag*)
(setq s (ssget "_X" *fil