Reference Rotate...

Discussion in 'AutoCAD' started by akdrafter, Jan 6, 2004.

  1. akdrafter

    akdrafter Guest

    Hello All,

    I am sure someone has a better way of doing this. Code posted below. What this does is when a user wants to "Rotate" using a "Reference" point, the routine uses the rotation base point as the refernce point instead of having to pick the reference point.

    (defun c:RR (/CME SNM OTHM OBJ PNT1 PNT2)
    (setq CME (getvar "CMDECHO"))
    (setq SNM (getvar "SNAPMODE"))
    (setvar "SNAPMODE" 0)
    (setq OTHM (getvar "ORTHOMODE"))
    (setvar "ORTHOMODE" 0)
    (setq OBJ (ssget))
    (setq PNT1 (getpoint "\n Select First Reference/Rotation Point: "))
    (setq PNT2 (getpoint "\n Select Second Reference Point/Angle: "))
    (command "._rotate" OBJ "" PNT1 "reference" PNT1 PNT2 pause)
    (setvar "CMDECHO" CME)
    (setvar "SNAPMODE" SNM)
    (setvar "ORTHOMODE" OTHM)
    (princ)
    )

    "Catch" Ya Later,
    AKDRAFTER
     
    akdrafter, Jan 6, 2004
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.