Alaskachick Posted September 22, 2010 Posted September 22, 2010 I have a block. In it's attributes is a tag called "website". The block attribute value is a url or http:// that leads you to a picture. The block is repeated throughout the drawing with different values for each website tag that should take you to a different picture for each block occurrence. Currently, the text appears as dumb text, not as a hyperlink. I understand manually attaching a hyperlink to an drawing object. This is different in that I want autocad to automatically recognize that the block attribute text is a link and allow the user to click on the text in the properties window and the picture open. Does autocad recognize text as links like word or excel does? For example: if you type anything in a word document that starts with http://... word will recognize it as a link and give it link functionality. I need autocad to do this. It could be that this link functionality can only be used with object data and not with block attributes. That would limit me to only using civil 3D, but I can live with that. Any ideas? Quote
edwinprakoso Posted September 23, 2010 Posted September 23, 2010 AutoCAD will not recognize the text as url automatically. You need to use field to make a text a hyperlink. The same thing you need to use in block attributes. You can edit the url later in block attributes, but as I said, AutoCAD doesn't convert text automatically to hyperlink. Quote
Alaskachick Posted September 23, 2010 Author Posted September 23, 2010 AutoCAD doesn't convert text automatically to hyperlink. Which begs the question, "Why not?" The automatic link function of word, excel and other programs is not a new tool. It seems AutoCAD could easily incorporate it. Maybe I need to figure out a lisp for that... Quote
Alaskachick Posted September 23, 2010 Author Posted September 23, 2010 I followed your advice and tried to make a block attribute value a hyperlink in block editor. It looks good in the block editor but when I regen and go to that block attribute in properties there is no hyperlink functionality. I have tried ctrl-click and rt click...all to no avail. Also, it does not apply the hyperlink to all occurrences of the block in the drawing. Shouldn't I be able to set a block attribute's value in the block editor to hyperlink and then every instance of that block will have a hyperlink in the value for that attribute no matter what the text? Thanks for the help. Quote
Jaap Marchal Posted December 21, 2010 Posted December 21, 2010 create the attribute "HYPERLINK" and use these lisp. A2H puts data from the HYPERLINK attribute as hyperlink to that block. (defun c:a2h ( / ss ) (vl-load-com) ;; © JM 2010 (if (ssget '((0 . "INSERT") (66 . 1))) (progn (vlax-for obj (setq ss (vla-get-ActiveSelectionSet (vla-get-ActiveDocument (vlax-get-acad-object)) ) ) (mapcar (function (lambda ( x ) (if (eq "HYPERLINK" (strcase (vla-get-TagString x))) (vla-Add (vla-get-Hyperlinks obj) (vla-get-Textstring x)) ) ) ) (vlax-invoke obj 'GetAttributes) ) ) (vla-delete ss) ) ) (princ) ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.