Author Topic: Lisp Routine for hyperlinking  (Read 3445 times)

0 Members and 1 Guest are viewing this topic.

krampaul82

  • Guest
Lisp Routine for hyperlinking
« on: October 22, 2012, 03:44:05 PM »
Hey Swampers

I have about 1000 blocks that are hyperlinked to a specific PATH that will display a pdf cut sheet.
The PATH has now changed. does anyone know of a lisp routine that can change the hyperlinks
without having to use the block editor properties to change the path of the hyperlinked file?
any help appreciated! :|
Mark

Gu_xl

  • Mosquito
  • Posts: 6
Re: Lisp Routine for hyperlinking
« Reply #1 on: October 22, 2012, 10:14:54 PM »
Code - Auto/Visual Lisp: [Select]
  1. (defun c:tt(/ blkname Hyperlinks ss n)
  2.   (setq blkname (getstring "\nInput insert name :")
  3.         Hyperlinks (getstring "\nInput Hyperlinks :"))
  4.   (if (and
  5.         (/= "" blkname)
  6.         (/= "" Hyperlinks)
  7.        (setq ss (ssget (list '(0 . "insert")(cons 2 blkname))))
  8.         )
  9.     (repeat (setq n (sslength ss))
  10.       (seturl (ssname ss (setq n (1- n))) Hyperlinks)
  11.       )
  12.     )
  13.   (princ)
  14.   )
  15.  

krampaul82

  • Guest
Re: Lisp Routine for hyperlinking
« Reply #2 on: November 09, 2012, 11:13:13 AM »
GU_xl
Maby I am missing somthing but what i would like to do is pick a directory and have the code
go through each acad drawing and change the hyperlink path in the block editor as well as the hyperlink PATH in the properties dialog is this possible? any help appreciated.