|
Free AutoLISP for AutoCADThis function can be used if you have moved an xref to another location or if you both have renamed the xref as well as moved it to a new folder. First argument is the old name More Free AutoLISP and Visual LISP code snippets for AutoCAD (defun XrefRename (oldname newname newpath)
(if (and (findfile (strcat newpath newname ".dwg"))
(ssget "X" (list '(0 . "INSERT") (cons 2 oldname))))
(progn
; rename the xref if it is found
(command "rename" "b" oldname newname)
; change the path of the xref if it is found
(command
"-xref"
"p"
newname
(strcat newpath newname)
)
)
)
)
|


