Faouweb Posted September 12, 2014 Share Posted September 12, 2014 Hi, Is there any LISP to Unload all XREF? Thank you. Quote Link to comment Share on other sites More sharing options...
Stefan BMR Posted September 12, 2014 Share 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 Link to comment Share on other sites More sharing options...
Faouweb Posted September 12, 2014 Author Share 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 Link to comment Share on other sites More sharing options...
Stefan BMR Posted September 12, 2014 Share 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 Link to comment Share on other sites More sharing options...
Faouweb Posted September 12, 2014 Author Share 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 Link to comment Share on other sites More sharing options...
pipefitter72 Posted October 25, 2014 Share Posted October 25, 2014 one I found xu.lsp (defun C:Xu ( / ) (command "-xref" "u" "*") (princ) ) Quote Link to comment Share on other sites More sharing options...
piscopatos Posted October 26, 2014 Share 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 Link to comment Share on other sites More sharing options...
Dana W Posted October 26, 2014 Share 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 Link to comment Share on other sites More sharing options...
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.