;;; Copy entities and paste it as block with insertion point 0,0,0 at once
;;; Created by Henrique hmsilva http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-and-paste-as-block/td-p/6022554
;;; Modified by Igal Averbuh 2016
(defun c:cpb (/ ss)
(command "ucs" "w")
(setvar "cmdecho" 0)
(layerstate-save "exist" nil nil)
(command "-layer" "u" "*" "")
(princ "\nSelect objects to copy from 0,0,0 and paste as block:")
(setq ss (ssget))

(command "_.copybase" '(0.0 0.0 0.0) ss "" "_.pasteblock" '(0.0 0.0 0.0))
(command "erase" ss "")

(command "ucs" "previous")
(setvar "ucsicon" 1)
(layerstate-restore "exist" nil nil)
(setvar "cmdecho" 1)
(princ)
)
;(c:cpb)

Advertisements