Over the years supporting AutoCAD I have been asked, where are my XREFs? Co-workers have place the references on the current layers and turned off that layer. I wrote a simple lisp routine that will place the reference on a specified called "G-ANNO-REFR" which can be changed to your company standards.
The lisp routine uses the "XA" command (which can be changed to your likings). XA is a default command for XATTACH. Once the lisp routine is set in the CUI startup, it will over ride the default "XA" command. Run the XA command to attach a drawing. Once the drawing is attached, the previous layer will be restored.
Items in red can be changed per user preference.
;SETS LAYER G-ANNO-REFR CURRENT BEFORE
;ATTACHING A DRAWING
;
;
(defun C:xa ()
(command "layerpmode")
(command "on")
(command "-layer")
(command "m")
(command "G-ANNO-REFR")
(command "")
(initdia) (command "_XATTACH")
(command "_layerp")
(princ)
)
No comments:
Post a Comment