;; | --------------------------------------------------------------------------- ;; | BL_GetNumAtts ;; | --------------------------------------------------------------------------- ;; | Function : Get the number of attributes in a BLOCK INSERT entity ;; | Argument : BlkName - (entity ename) ;; | Return : The number of attributes ;; | Update : March 6, 1998 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | --------------------------------------------------------------------------- (defun BL_GetNumAtts(BlkName / ename entl en tbl flag NAtts) (setq tbl (tblsearch "BLOCK" BlkName) NAtts 0 ) (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 NAtts (1+ NAtts)) ) (setq ename (entnext ename)) ) )) )) NAtts )