Jump to content

Move/Rotate Copy/Rotate lsp


hiddenline

Recommended Posts

Hi! I just installed Autocad 2009, along with the express tools...I see that they have done away wtih MR & CR!!! Just MOCORO..way too long and annoying. :?

I looked on some other sites but haven't found a lsp routine for Move/Rotate or copy/Rotate. I saw on this site some verbage about it- but I don't konw how to write/enter code! would be great to learn though...

Thanks for your help!!

Link to comment
Share on other sites

Ok, got these and have actually read through all these yesterday.

None of them do what v2004 did. Just simply typing

MR gave you a move/rotate command and

CR gave you a copy/rotate command

 

someone had a move/rotate code....but honsetly, what the heck do I do wtih it? i entered in each line, but it didn't work. What could I be doing wrong??

I am a commercial furniture space planner so I use these commands hundreds of times a day and now that I don't have them everything is taking soooo much longer, billable hours are down, etc. so i'm freaking out a little. Thanks so much for your help! I just need my hand held a little and I'm hoping someone can PLEASE help me!

Link to comment
Share on other sites

I guess you didn't notice this one... read the second to last line.

;;;   Mcr.Lsp
;;;   Copyright (C) 1990 by Autodesk Australia Pty. Ltd.
;;;  
;;;   Permission to use, copy, modify, and distribute this software and its
;;;   documentation for any purpose and without fee is hereby granted.  
;;;
;;;   THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. 
;;;   ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF 
;;;   MERCHANTABILITY ARE HEREBY DISCLAIMED.
;;; 
;;;-------------------------------------------------------------------------
;;; DESCRIPTION:
;;;
;;;   Mcr.Lsp provides two new commands, MoveRot and CopyRot.
;;;   MoveRot, MOVEs and ROTATEs selected entities whilst
;;;   CopyRot, COPYies and ROTATEs selected entities.
;;;
;;;   Written by  Sam Crupi, Autodesk Australia Pty. Ltd.
;;;               October 1987
;;;   Modified by Jeff De Silva & Sam Crupi, Autodesk Australia Pty. Ltd.
;;;               November 1990
;;;
;;;   Version 1.0
;;;   4 December 1990
;;;
;;;-------------------------------------------------------------------------
;;;
;;; Error function
;;;
(defun mcr_err (s)                   ; If an error (such as CTRL-C) occurs
                                    ; while this command is active...
 (if (/= s "Function cancelled") 
   (if (= s "quit / exit abort") 
     (princ) 
     (princ (strcat "\nError: " s))
   )
 ) 
 (if mcr_oer                        ; If an old error routine exists
   (setq *error* mcr_oer)           ; then, reset it 
 ) 
 (if mcr_oce                        ; Reset command echoing on error
   (setvar "cmdecho" mcr_oce)
 ) 
 (princ)
) 
;;;
;;; Command MoveRot
;;;
(defun c:MoveRot (/ sset mcr_oce mcr_oer) 
 (setq mcr_oce (getvar "cmdecho"))  ; save cmdecho setting
 (setvar "cmdecho" 0)               ; turn cmdecho off
 (if *error*                        ; Set our new error handler
   (setq mcr_oer *error* 
         *error* mcr_err)
   (setq *error* mcr_err)
 ) 
 (princ (strcat "\nMoveRot, Version " mcr_ver 
                ", (C) 1990 by Autodesk Australia Pty. Ltd. "
        )
 ) 
 (if (setq sset (ssget))            ; get selection set
   (progn
     (setvar "cmdecho" 1)           ; turn cmdecho on to allow MOVE
                                    ; prompts to appear
     (command "MOVE" sset "" pause pause) ; MOVE them
     ;; now ROTATE the selection set using the LASTPOINT as Base point
     (command "ROTATE" sset "" (getvar "LASTPOINT") pause) 
   )
 )
 (setvar "cmdecho" mcr_oce)         ; reset cmdecho to old setting
 (if mcr_oer                        ; If an old error routine exists
    (setq *error* mcr_oer)          ; then set it back
 ) 
 (princ)
) 
;;;
;;; Command CopyRot
;;;
(defun c:CopyRot (/ mcr_oce mcr_oer sset) 
 (setq mcr_oce (getvar "cmdecho"))  ; save cmdecho setting
 (setvar "cmdecho" 0)               ; turn cmdecho off
 (if *error*                        ; Set our new error handler
   (setq mcr_oer *error* 
         *error* mcr_err)
   (setq *error* mcr_err)
 ) 
 (princ (strcat "\nCopyRot, Version " mcr_ver 
                ", (C) 1990 by Autodesk Australia Pty. Ltd. "
        )
 ) 
 (if (setq sset (ssget))            ; get selection set
   (progn
     (command "COPY" sset "" "0,0" "0,0") ; COPY selection set over itself
     (setvar "cmdecho" 1)           ; turn cmdecho on to allow MOVE
                                    ; prompts to appear
     (command "MOVE" "p" "" pause pause) 
     (redraw)                       ; Redraw screen
     ;; now ROTATE the selection set using the LASTPOINT as Base point
     (command "ROTATE" "p" "" (getvar "LASTPOINT") pause)
   )
 )
 (setvar "cmdecho" mcr_oce)         ; reset cmdecho to old setting
 (if mcr_oer                        ; If an old error routine exists
    (setq *error* mcr_oer)          ; then set it back
 ) 
 (princ)
) 
;;;
;;; Define the c: functions.
;;;
(defun c:MR () 
 (c:MoveRot)
) 
(defun c:CR () 
 (c:CopyRot)
) 
(setq mcr_ver "1.0")                 ; set version number string
;;(princ (strcat "\nC:MCR (v" mcr_ver ") loaded.")) 
;;(princ "\nMR or MoveRot to Move and Rotate, CR or CopyRot to Copy and Rotate.") 
(princ)

You might also want to look here: http://www.cadtutor.net/faq/questions/28/How+do+I+use+an+AutoLISP+routine%3F

Link to comment
Share on other sites

  • 8 months later...

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