Jump to content

Hyperlink path Absolute to Relative


Zeek

Recommended Posts

Several hundred (or more) of the hyperlink paths from my predecessors are absolute paths, but the network drive names have changed.  This, of course, leads to not being able to find the destination.  When I find them I convert them to relative paths, and in about 65 or 70 years I will probably have them all "fixed".

So I'm hoping, much like using ATTOUT to get a list of block attributes (and more importantly, the list of blocks) the is something that will generate a report of hyperlinks.

From there I'm hoping there's a simple method of converting them to relative path.  Or maybe there's something even better and easier that I'm not aware of (which is what I'm guessing).

 

These are utility infrastructure maps, and they are based in 1/4 section, and utility.  So the Water Dept. maps number about 50, and Electric Dept. has about 30 maps... so all in all there are 80 maps (or so) saved as individual files.  Each file has between 2 and 60 hyperlinks.  The last page I worked on was about 50/50 for relative or absolute path.  Quick crash on math, there could be as many as 1200 Absolute Path hyperlinks that need to be corrected.  (Averaging 31 hyperlinks per page, 80 pages... 2480 hyperlinks.  About 50% were absolute paths... 1240.  Being optimistic and rounded down to 1200 ;-0)

 

Any assistance is greatly appreciated.

 

Edited by Zeek
Link to comment
Share on other sites

The hyperlink is attached to an object its a case of getting it, then should be able to change its value. this is a bit of sample code for testing pick a hyperlink object. Really need a dwg with what the new hyperlink is to be. A select all objects then "has-property-hyperlink" it will not be fast as it has to check all objects and that can be a lot. If only blocks that helps.

 

(defun c:test ( / obj hyp hypi)
(setq obj (vlax-ename->vla-object (car (entsel "pick object"))))
(setq hyp (vla-get-hyperlinks obj))
(vlax-for hypi hyp
(vlax-dump-object hypi)
)
)

 

; IAcadHyperlink: A URL and URL description
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00007ff761361e30>
;   URL = "http://www.alanh.com.au"
;   URLDescription = "alans"
;   URLNamedLocation = ""

 

Edited by BIGAL
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...