Does anyone know of a way to have the location of the xref attach dialog box always default to the folder of the active drawing? I found a way to do it with the open dialog box, and thought it would be easy to do it with the xattach box also. Thanks in advance for your help.
This is the code for open to default to the current drawing's folder:
(defun c:op (/ dwgname)
(if (setq dwgname (getfiled "select drawing file" (getvar "dwgprefix") "dwg" 0))
(vla-activate (vla-open (vla-get-documents (vlax-get-acad-object)) dwgname))
)
(princ)
)