Community
I have some drawing's with huge amount of xref's but many of them have not same names as external xref file name. Example: internal xref name "arch-290612" connected to external file name "arh-231213" and so on..
How can I make xref name equal to external file name "all an once" per one lisp session (need lisp programm for it)?
Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
As a 'demo'
(vl-load-com)
(defun c:demo (/ name) (vlax-For blk (vla-Get-Blocks (vla-Get-ActiveDocument (vlax-Get-Acad-Object)) ) (if (and (= (vla-Get-IsXref blk) :vlax-True) (not (wcmatch (vla-get-Name blk) (setq name (vl-filename-base (setq path (vla-get-path blk))) ) ) ) ) (if (not (vl-catch-all-error-p (vl-catch-all-apply '(lambda () (vla-put-Name blk name))) ) ) (vla-reload blk) ) ) ) (princ) )
Hope that helps
Henrique