Jump to content

Need LISP to Unload all XREF


Faouweb

Recommended Posts

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))
 )
)

Link to comment
Share on other sites

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))))  ) )

Link to comment
Share on other sites

  • 1 month later...
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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...