Faouweb Posted September 12, 2014 Posted September 12, 2014 Hi, Is there any LISP to Unload all XREF? Thank you. Quote
Stefan BMR Posted September 12, 2014 Posted September 12, 2014 (vlax-for block (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) (if (= (vla-get-isxref block) :vlax-true) (vla-unload block)) ) Quote
Faouweb Posted September 12, 2014 Author Posted September 12, 2014 How can I use it? I have tried to defun c: TEST () ; and I have put the code but it doesn't work. I am not a specialist of AutoLISP Thank you. Quote
Stefan BMR Posted September 12, 2014 Posted September 12, 2014 Sorry.. Try this (defun c:test nil (vl-load-com) (vlax-for block (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) (if (= (vla-get-isxref block) :vlax-true) (vla-unload block)) ) ) Quote
Faouweb Posted September 12, 2014 Author Posted September 12, 2014 Thank you Stefan BMR I have found this also: (defun c:XDetach (/ blk) (while (setq blk (tblnext "block" (not blk))) (if (and (cdr (assoc 1 blk)) (< (cdr (assoc 70 blk)) 32)) (command "_-xref" "_d" (cdr (assoc 2 blk)))) ) ) Quote
pipefitter72 Posted October 25, 2014 Posted October 25, 2014 one I found xu.lsp (defun C:Xu ( / ) (command "-xref" "u" "*") (princ) ) Quote
piscopatos Posted October 26, 2014 Posted October 26, 2014 one I found [ATTACH]51388[/ATTACH] (defun C:Xu ( / ) (command "-xref" "u" "*") (princ) ) (command "-xref" "u" "*") what does "*" this do ? and where else we can use "*" this. Quote
Dana W Posted October 26, 2014 Posted October 26, 2014 It means ALL or ANY. It is a wildcard search or selection symbol. It can be used pretty much anywhere you want to find or select ALL. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.