PDA

View Full Version : Match Hyperlink Property


bzrqmy
2006-02-21, 04:15 PM
I have applied hyperlinks to an index sheet so that when you Ctrl+Click on the text in the index, it opens it's corresponding sheet. I would like to add a graphic next to the text which will also open the sheet when clicked. The stock match properties command will not match the hyperlink property.

Does anyone know of a lisp to do this?

Thanks,

Bzrqmy

dbrower
2006-02-23, 07:19 PM
Is this what you need?

;***By Dann Brower
(defun C:copylnk (/ obj hlink url)
(setq obj (objsel "\nSelect Object to get hyperlink from: ")
hlink (vla-item (vla-get-hyperlinks obj) 0)
url (vla-get-URL hlink)
)
(setq obj (objsel "\nSelect Object to copy hyperlink to: ")
hlink (vla-get-hyperlinks obj)
)
(vla-add hlink url)
)
(defun objsel ($prompt / ent obj)
(setq ent (car (entsel $prompt)))
(if (/= ent nil)
(setq obj (vlax-ename->vla-object ent))
(princ "No Object Selected")
)
obj
)

[ Moderator Action = ON ] What are [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code) [ Moderator Action = OFF ]