Summon Hyperlink Text

Summon Hyperlink Text

jmartt
Collaborator Collaborator
821 Views
2 Replies
Message 1 of 3

Summon Hyperlink Text

jmartt
Collaborator
Collaborator

My weekend project is this: Make a button that, when pressed, will ask me to select an object and then displays the hyperlink text associated with the selection. It would be the "1730" from the screenshot of the Properties window.

 

I've dabbled, I guess, with LISP. Pretty sure I can cobble together the pause-for-user-input and Alert window routines from other things I've done or saved and get something to work. But I've no idea how to say "Go get the hyperlink text". I've searched a bit and haven't found something right-off...I wonder if this is gonna be worth it.

 

Is there a name for the hyperlink text that I can call? Is there way more to this and I should abandon this endeavor?

 

Thanks, gurus.

Capture.PNG

0 Likes
Accepted solutions (1)
822 Views
2 Replies
Replies (2)
Message 2 of 3

ActivistInvestor
Mentor
Mentor
Accepted solution

For the simplest case (one hyperlink): 

 

 


(vl-load-com)

(defun C:HYPERLINKTEXT (/ e h) (cond ( (not (setq e (car (entsel))))) ( (zerop (vla-get-count (setq h (vla-get-hyperlinks (vlax-ename->vla-object e))))) (princ "\nNo hyperlink found on selected object")) (t (princ (strcat "\nHyperlink text: " (vla-get-URLDescription (vla-item h 0) ) ) ) ) ) (princ) )

@jmartt wrote:

My weekend project is this: Make a button that, when pressed, will ask me to select an object and then displays the hyperlink text associated with the selection. It would be the "1730" from the screenshot of the Properties window.

 

I've dabbled, I guess, with LISP. Pretty sure I can cobble together the pause-for-user-input and Alert window routines from other things I've done or saved and get something to work. But I've no idea how to say "Go get the hyperlink text". I've searched a bit and haven't found something right-off...I wonder if this is gonna be worth it.

 

Is there a name for the hyperlink text that I can call? Is there way more to this and I should abandon this endeavor?

 

Thanks, gurus.

 


 

Message 3 of 3

jmartt
Collaborator
Collaborator

Dude. What am I supposed to do with my weekend now, huh?

 

Thanks a lot!

0 Likes