Copy & Rotate

I had a co-worker ask me if I could write a lisp that would copy & rotate an object.

AutoCAD does have an out-of-the-box move/copy/rotate but my co-worker was looking for something that was more stream line, so I developed this simple copy & rotate lisp.

 


(defun c:CopyR (/ *error*)

(defun *error* ( msg )
(if (not (member msg '("Function cancelled" "quit / exit abort")))
(princ (strcat "\nError: " msg))
)
(princ)
)
(princ "\nCopy & Rotate:\n")
(setq ss (ssget))
(command "copy" ss "" "0" "0")
(command "move" ss "" pause pause)
(command "rotate" ss "" "@" pause)
)
(princ)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s