Jump to content

Recommended Posts

Posted

Hye, I Have a Lisp Routine that copy blocks (not objects) from xref's
this routine let me select only 1 block and i would like to select more or even previews selection in autocad memory.
also, it woud be great if it possible to choose a nested level.
Thanks for any help!

 

(defun c:nrefcopy ( / ns e p )
(setq e (cadar (reverse (setq ns (nentsel "\nPick nested reference to copy from parent reference")))))
(setq p (cadr ns))
(command "_.-REFEDIT" "_non" p "_O" "_N" "_non" p "" "_Y")
(command "_.COPY" "_non" p "" "0,0" "0,0" "")
;(while (< 0 (getvar 'cmdactive)) (command "\\"))  ..? did not understand what it does..?
(command "_.REFSET" "_R" (entlast) "")
(command "_.REFCLOSE" "d")  ; discard all changes, PICK THE ITEM BUT DO NOT SAVE, POSSIBLE FILE PROP REVISIONS ETC., ITS SAVER  
(command "_.move" p "" pause)  ; HIGHLIGHT IT AND BEGIN A MOVE ACTION
(princ)
)

Posted

Lee-mac steal.lsp may be useful it can be called from a lisp with no user interaction an xref is another dwg.

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