这些仅仅是将超链接添加到对象的超链接集合的普通AutoLISP等价物,不同的是您不能像使用超链接集合那样使用这些函数添加描述或命名位置。
还请注意,在Vanilla AutoLISP中,VL超链接集合相当于附加到实体的扩展数据(应用程序:“PE\u URL”),因此可以使用entmod添加。
例如,在使用以下每个函数后,比较实体DXF数据(可能使用此函数):
- (defun c:test1 ( / e )
- (if (setq e (car (entsel "\nSelect Object to Add Hyperlink to: ")))
- (seturl e "http://www.google.co.uk")
- )
- (princ)
- )
- (defun c:test2 ( / e )
- (if (setq e (car (entsel "\nSelect Object to Add Hyperlink to: ")))
- (vla-add (vla-get-hyperlinks (vlax-ename->vla-object e)) "http://www.google.co.uk")
- )
- (princ)
- )
|