Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to: Detach xrefs

2 REPLIES 2
Reply
Message 1 of 3
jcourtne
426 Views, 2 Replies

How to: Detach xrefs

I need the command to detach an xref given the object one would click on via
(vlax-ename->vla-object (car(entsel "Pick xRef")))
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: jcourtne

(defun C:RXF (/ ES EG TS)
(if (and (setq ES (entsel "\nSelect Xref ? "))
(setq EG (entget (car ES)))
(setq TS (tblsearch "BLOCK" (cdr (assoc 2 EG))))
(= (logand 4 (cdr (assoc 70 TS))) 4)
)
(vl-cmdf "XREF" "D" (cdr (assoc 2 EG)))
)
(princ)
)
wrote in message news:6363763@discussion.autodesk.com...
I need the command to detach an xref given the object one would click on via
(vlax-ename->vla-object (car(entsel "Pick xRef")))
Message 3 of 3
Kent1Cooper
in reply to: jcourtne

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost