;; | --------------------------------------------------------------------------- ;; | BL_FindAttrNo ;; | --------------------------------------------------------------------------- ;; | Function : Find the attribute in a block given the position ;; | Argument : 'ename' - entity name of the block ;; | 'pos' - position of the attribute from start (from 1) ;; | Returns : The attribute entity name, if it exists otherwise nil is ;; | returned ;; | Updated : November 12, 1998 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | --------------------------------------------------------------------------- (defun BL_FindAttrNo( ename pos / entl en cnt More _tag aname More tmp ) (setq entl (entget ename) tmp (LI_item 66 entl) aname nil ) (if (and tmp (not (zerop (logand tmp 1)))) (progn (setq en "ATTRIB" aname nil More T cnt 0 ) (while More (setq ename (entnext ename) entl (entget ename) en (LI_item 0 entl) cnt (1+ cnt) ) (if (= en "ATTRIB") (progn (if (= pos cnt) (setq aname ename More nil )) ) (setq More nil) ) ) )) aname )