;; | ---------------------------------------------------------------------------- ;; | BL_GetAllBlksWithAttributes ;; | ---------------------------------------------------------------------------- ;; | Function : Find out the names of the 'normal' blocks with attributes in the ;; | current drawing document ;; | Argument : none ;; | Returns : A list of all current 'normal' blocks with attributes ;; | Updated : December 29, 2000 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun BL_GetAllBlksWithAttributes ( / BlkLst XrefLst Lst tmp blkName itm ) (setq BlkLst '() Lst (MI_tbldata "BLOCK") ) (if Lst (progn (setq Lst (cadr Lst)) (foreach tmp Lst (setq itm (LI_item 70 tmp)) (if (and (not (zerop (logand itm 2))) ; Normal block and block with attribute (zerop (logand itm 4)) ; Not an external reference (zerop (logand itm 8)) ; Not an external overlay (zerop (logand itm 16)) ; Not externally dependent (zerop (logand itm 32)) ; Not a resolved external reference, or dependent of an external reference (zerop (logand itm 64)) ; Not a referenced external reference ) (setq BlkLst (cons (LI_item 2 tmp) BlkLst)) ) ) )) (if BlkLst (setq BlkLst (acad_strlsort (mapcar 'strcase BlkLst))) ) BlkLst )