AutoDesk Labs has a bunch of cool plugins for AutoCAD. The one that that looks especially useful to me is RefUcsSpy. From the site:
Many AutoCAD users have reference files set up in World coordinates. Attaching such files when in a different User Coordinate System (UCS) can result in the contents appearing at incorrect locations. This plugin can be used within AutoCAD to detect when reference files are being attached when the UCS is not “World.” If it is not, the user will be prompted whether they would like to temporarily set the UCS to World for the duration of the attach command.
I tested it, and it works… except with CLASSICXREF. AutoDesk, can you can fix this?
The other plugins that look useful are DrawOrderByLayer, XrefStates, and OffsetInXref.
Free downloads here:
http://labs.autodesk.com/utilities/ADN_plugins/catalog/
Update: AutoDesk Labs was kind enough to send me a version that works with CLASSICXREF. It activates when the command is run. I really appreciate this, but I find the functionality to be more of a hindrance than anything, because sometimes I just want to unload or open an xref, and I don’t need the UCS warning dialog in those instances. They tell me that it is impossible to hook the Attach command from the CLASSICXREF dialog, because it doesn’t exist as an independent command like XATTACH. Ah, well.
Just in case you are still interested in the revised version, here it is: RefUcsSpy-1.0.2.zip.
Update 2: I wrote a little AutoHotKey Script that magically drops out of the CLASSICXREF dialog and runs the XATTACH command, thereby activating RefUCSSpy. If you haven’t installed AutoHotKey already (it’s a fantastic tool), do so, then save the following as AutoCAD_keys.ahk or something similar, and run it when AutoCAD is running:
#Persistent
SetTimer, ControlGetUM
return
ControlGetUM:
ControlUnderMouse := ControlGetUM("class")
if ControlUnderMouse = Button4
return
ControlGetUM(what="ID") { ; by Learning one
MouseGetPos,,,, ControlID, 2
MouseGetPos,,,, ControlClass
if (what = "ID" or what = "I")
Return ControlID
else if (what = "Class" or what = "C")
Return ControlClass
else if (what = "Text" or what = "T") {
ControlGetText, ControlText , , ahk_id %ControlID%
Return ControlText
}
}
#IfWinActive, Xref Manager, &Attach... ;if Xref Manager is active
LButton::
if ControlUnderMouse = Button4
{
Send {Esc}
Send XATTACH{Enter}
} else {
Click
}
return
(Note: use this with the version of RefUCSSpy available on the AutoDesk Labs site, not the 1.02 version I posted above.)

