;; | ------------------------------------------------------------------------------ ;; | MI_GetDisplayColor ;; | ------------------------------------------------------------------------------ ;; | Function : Get the display color of an object ;; | Arguments: 'ename' - Object name ;; | Returns : 'Clr' - An integer which is the display color of the object ;; | ;; | Comments : The display color is either the actual assigned color to the object ;; | or the BYLAYER color if it is not assigned an actual color. ;; | Updated : August 11, 2001 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ------------------------------------------------------------------------------ (defun MI_GetDisplayColor( ename / entl Clr ) (setq entl (entget ename) Clr (LI_item 62 entl) ) (if (or (not Clr) (= Clr 256) (= Clr 0)) ; Not set .or. BYLAYER .or. BYBLOCK (setq Clr (abs (LI_item 62 (tblsearch "LAYER" (LI_item 8 entl))))) ) Clr )