I was going to suggest something similar to Alan's reply, but I wondered whether you have some reason that you need to do this with it *as a VLA object*, rather than simply by its entity name as he suggested. If you do, presumably you've done other things with it before you want to detach it, so you've already confirmed that it *is* an Xref, and it is already saved as a VLA object to a variable name -- let's say it's XV [for Xref Vla-object]. Either of these should do it:
(command "_.xref" "_detach" (vla-get-name XV))
or
(vl-cmdf "_.xref" "_detach" (vla-get-name XV))
--
Kent Cooper
jcourtne wrote...
I need the command to detach an xref given the object one would click on via
(vlax-ename->vla-object (car(entsel "Pick xRef")))
Kent Cooper, AIA