Thanx Kerry. The thing is I have a guy at work with routine below which adds hyperlink and in HLtip displays layer name just by pointing device on object. But when you have exist. drawing with say 20 xrefs, I do not want to open each individual file to run lisp file, therefore my attempt to get object info such as xref as well as layer name.
;HL.lsp Adds hyperlinks to entities based on their layer. 22/10/03 Alex Taylor-Innes, CAD & IT Services
(defun c:HL (/ ss I la)
(setvar "cmdecho" 0)
(princ "\nSelect Entities to add Hyperlinks derived from their layers:")
(setq ss (ssget))
(setq I 0)
(while (< I (sslength ss))
(setq ent (entget (ssname ss I)))
(setq la (cdr (assoc 8 ent)))
(command "-hyperlink" "insert" "object" (ssname ss I) "" "" " " la)
(setq I (1+ I))
)
(setvar "cmdecho" 1)(princ)
)