Jaap Marchal Posted December 6, 2010 Posted December 6, 2010 looking for a lisp that gives a mark to the option DWG HYPERLINK TO DWF in the hyperlink dialog (ctrl+k) TKS, Mike Quote
Jaap Marchal Posted December 7, 2010 Author Posted December 7, 2010 i found something, but i have to drag it from explorer to Autocad, is there a other lisp that kan be loaded from appload. found lisp: (defun markHlinkDWF () (setq mysel (ssget "_X" '((-3 ("PE_URL"))))) (setq iMaxSel (sslength mysel)) (setq iCnt 0) (while (< iCnt iMaxSel) (setq my_entname (ssname mysel iCnt)) (setq my_ent (entget my_entname '("PE_URL"))) ;; get the entity including Xdata for hlinks (setq my_xdata1 (assoc -3 my_ent)) ;; open up the XData (setq my_xdata_URL (nth 1 my_xdata1)) (setq my_new_xdata_URL (subst '(1071 . 1) '(1071 . 0) my_xdata_URL)) ;; enable flag for convert DWG to DWF (setq my_new_xdata1 (subst my_new_xdata_URL my_xdata_URL my_xdata1)) ;; update XData (setq my_ent (subst my_new_xdata1 my_xdata1 my_ent)) (entmod my_ent) ;; set the entity (setq iCnt (+ iCnt 1)) ) nil)(defun validate () (setq mysel (ssget "_X" '((-3 ("PE_URL"))))) (setq iMaxSel (sslength mysel)) (setq iCnt 0) (setq iFailCnt 0) (while (< iCnt iMaxSel) (setq my_entname (ssname mysel iCnt)) (setq my_ent (entget my_entname '("PE_URL"))) ;; get the entity including Xdata for hlinks (setq my_xdata1 (assoc -3 my_ent)) ;; open up the XData (setq my_xdata_URL (nth 1 my_xdata1)) (if (/= (member '(1071 . 0) my_xdata_url) nil) (setq iFailCnt (+ iFailCnt 1)) ) (setq iCnt (+ iCnt 1)) ) (if (> iFailCnt 0) (progn (setq my_str (strcat (itoa iFailCnt) " hyperlink(s) not updated.") ) (princ my_str) nil ) )) 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.