I'd like to change the XREF(s) "Saved Path" to the "Found at" location using LISP.
I know I can do it by using CLASSICXREF ... "Saved Path" button, but would like to do it at startup via LISP.
|
|
|
I'd like to change the XREF(s) "Saved Path" to the "Found at" location using LISP.
I know I can do it by using CLASSICXREF ... "Saved Path" button, but would like to do it at startup via LISP.
Give this a try:
Code:;;;--------------------------------------------------------------------; ;;; XrefPaths fundtion: (defun XrefPaths () (vl-load-com) ((lambda (acDoc / oBlocks oXref) (vlax-for oItem (vla-get-filedependencies acDoc) (if (and (= "Acad:XRef" (vla-get-feature oItem)) (setq oXref (vla-item (cond (oBlocks) ((setq oBlocks (vla-get-blocks acDoc)))) (vl-filename-base (vla-get-filename oItem))))) (vla-put-path oXref (vla-get-fullfilename oItem))))) (vla-get-activedocument (vlax-get-acad-object))) (princ)) ;;;--------------------------------------------------------------------; ;;; Autorun XrefPaths fundtion: (XrefPaths)
"How we think determines what we do, and what we do determines what we get."
Sincpac C3D ~ Autodesk Exchange Apps
Computer Specs:
Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000