;; | --------------------------------------------------------------------------- ;; | BL_SetAttrLyr ;; | --------------------------------------------------------------------------- ;; | Function : Set the attribute layer ;; | Argument : 'ename' - entity name of the block ;; | 'tag' - tag name of attribute to edit ;; | 'Lyr' - Layer Name to set (will be created if does not exist) ;; | Returns : (nothing) ;; | Updated : February 9, 2007 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | --------------------------------------------------------------------------- (defun BL_SetAttrLyr ( ename tag Lyr / aname entl ) (setq aname (BL_FindAttr ename tag)) ; Search for attribute (if aname (progn (setq entl (entget aname) entl (subst (cons 8 Lyr) (assoc 8 entl) entl) ) (entmod entl) (entupd ename) ) (setq ename nil) ) ename )