;; | --------------------------------------------------------------------------- ;; | BL_GetTagNames ;; | --------------------------------------------------------------------------- ;; | Function : Get the names of the tags (and flag values) belonging to a ;; | block. ;; | Argument : BlkName ;; | Return : List of all tag names and flag values ;; | Comments : Tag Names are always returned in upper-case, irrespective ;; | of how they are defined within the block. ;; | Updated : March 9, 2002 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | --------------------------------------------------------------------------- (defun BL_GetTagNames ( BlkName / tbl flag ename en entl AttLst ) (setq AttLst '() tbl (tblsearch "BLOCK" BlkName) ) (if tbl (progn (setq flag (LI_item 70 tbl)) (if (not (zerop (logand flag 2))) (progn (setq ename (LI_item -2 tbl)) (while ename (setq entl (entget ename) en (LI_item 0 entl) ) (if (= en "ATTDEF") (setq AttLst (cons (list (strcase (LI_item 2 entl)) (LI_item 70 entl)) AttLst)) ) (setq ename (entnext ename)) ) (setq AttLst (reverse AttLst)) )) )) AttLst )