; Lists all hyperlinks in a drawing (by XANADU.cz)
;
(defun C:ListLinks ( / ss ssl i ento hyp1 h l1)
  (vl-load-com)
  (setq List_Links (list))
  (setq ss (ssget "_X" '((-3 ("PE_URL")))))
  (setq ssl (sslength ss))
  (setq i 0)
  (while (< i ssl)
 	(setq ento (vlax-ename->vla-object (ssname ss i)))
    (setq hyp1 (vla-get-hyperlinks ento))
	
    (vlax-for h hyp1
     (setq l1 (vla-get-URL h))
	 (setq List_Links (cons l1 List_Links))
    )

    (setq i (1+ i))
  )
;all done , display it
 (princ "\nHyperlinks in this drawing:")
 (foreach i List_Links (princ (strcat "\n" i)))
 (princ "\n")
; List_Links contains the list of all hyperlinks for possible other use
 (princ)
)
