Adding multiple hyperlinks to a single object
I'd like to add multiple hyperlinks to a single point object preferable using vlisp. Is this possible ?
thank you !
thank you !
0
Comments
-
I don't think thats possible.
i knew only one link to one Object0 -
All drawing objects have a hyperlinks property. Because this is a collection it can contain multiple items. But only the first hyperlink is displayed to the user.
[code]; (AddHyperlink (vlax-ename->vla-object (car (entsel))) "http://www.b-k-g.nl/freeware.html" "Freeware for BricsCAD" "top")
; (AddHyperlink (vlax-ename->vla-object (car (entsel))) "http://www.geopus.com/" "" "")
(defun AddHyperlink (obj url urlDescription urlNamedLocation / lnks)
(setq lnks (vla-get-hyperlinks obj))
;; Remove existing links with the same url:
(mapcar
'(lambda (lnk)
(if (= (strcase url) (strcase (vla-get-url lnk)))
(progn
(if vle-fastcom (vle-fastcom nil)) ; Required for V14.
(vla-delete lnk)
(if vle-fastcom (vle-fastcom T))
)
)
)
(vle-collection->list lnks)
)
(vla-add lnks url urlDescription urlNamedLocation)
)
; (AddHyperlinkList (vlax-ename->vla-object (car (entsel))) '(("http://www.b-k-g.nl/") ("http://www.geopus.com/")))
(defun AddHyperlinkList (obj lst)
(foreach itm lst
(AddHyperlink
obj
(car itm)
(cond ((cadr itm)) ("")) ; UrlDescription.
(cond ((caddr itm)) ("")) ; UrlNamedLocation.
)
)
)[/code]0 -
thx Roy !
To bad only 1 link is shown, is this the same in ACAD. I have to link pictures to points.
So the only option is to write my own hyperlink viewing tool i guess.0 -
Getting back on this i have the following issue: i cannot seem to use relative path settings.
hyperlinkbase setvar = "" If this is empty the drawing path is used as base.
In the dialog it shows the drawing path (hyperlinkbase) correctly, however when i next enter a subpath + filename in the field for filename, the link doesn't seem to work.
I'm assume you can use a subpath or am I wrong ?
ty0
This discussion has been closed.