+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Junior Member
    Using
    AutoCAD 2012
    Join Date
    Jun 2011
    Posts
    11

    Default Rotate copy reference around a centerpoint

    Registered forum members do not see this ad.

    Hi all,

    I've been trying to create a macro to rotate an object around a centerpoint while copying it. If doing this the long way my actions are as follows:

    rotate
    enter
    select object
    enter
    center
    enter
    select basepoint
    copy
    enter
    reference
    enter
    center
    specify reference angle
    specify second point
    specify new angle

    can somebody give me some guidance? Is it not possible to use center osnap command in a macro? Should this be done with a LISP?

    Thanks!

  2. #2
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,815

    Default

    Doing it in a different order may be easier. Pick object 1st.

    Code:
    (defun c:rocop ( / ss pt1 pt2 pt3) 
    (setq ss (ssget))
    (setq pt1 (getpoint "pick Centre pt"))
    (setq pt2 (getpoint pt1  "1st angle point"))
    (setq pt3 (getpoint pt1 "2nd angle point"))
    (command "rotate" ss "" pt1 "Copy" "R" pt1 pt2 pt3)
    )
    A man who never made mistakes never made anything

  3. #3
    Junior Member
    Using
    AutoCAD 2012
    Join Date
    Jun 2011
    Posts
    11

    Default

    Thanks BIGAL. This is close to what I'm trying to achieve but is missing a couple steps I think that make it function the way I want it to. Below is a capture of what i need it to do:

    https://i.imgur.com/j62ryJx.gifv

    Hopefully this is more clear. Is this something achievable?

    Thanks!

  4. #4
    Super Member nukecad's Avatar
    Computer Details
    nukecad's Computer Details
    Operating System:
    Win 10 home.
    Computer:
    Various machines.
    Using
    AutoCAD 2000i
    Join Date
    Apr 2009
    Location
    NW Cumbria (English Lake District)
    Posts
    701

    Default

    Any reason this has to be a macro/lisp?

    Can you not just use the polar array command?
    *** Out of Beer Error ->-> Recovering Memory***

  5. #5
    Junior Member
    Using
    AutoCAD 2012
    Join Date
    Jun 2011
    Posts
    11

    Default

    Quote Originally Posted by nukecad View Post
    Any reason this has to be a macro/lisp?

    Can you not just use the polar array command?
    Polar array would work for the example I showed, however I really only meant it as an example to demonstrate the process. I use this often on larger scales with multiple increments, etc. This is the best way I've found over the years for the particular application but finally decided to try and speed it up by eliminating some key stroke, if possible.

  6. #6
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,815

    Default

    Its totally different to what you asked for, pick circle, pick object, pick chord 2 points, how many required clockwise or anti. It also depends a bit on how say that square is drawn is it the corners that touch the circle ? This is a Gear type lisp solution using pitch for gear spacing. Its not that hard to do anyway had a few minutes.

    Code:
    ; simple rotatecopy
    ; By Alan H nov 2017
    (defun c:rocop ( / ss pt1 pt2 pt3) 
    (setq pt1 (getpoint "pick Centre pt"))
    (setq pt2 (getpoint pt1  "1st angle point"))
    (setq pt3 (getpoint pt1 "2nd angle point"))
    (setq howmany (Getint "Enter How many"))
    (setq ss (ssget))
    (command "rotate" ss  "" pt1 "Copy" "R" pt1 pt2 pt3)
    (if (= howmany 1)(princ "1")
    (progn
    (repeat (- howmany 1)
    (command "rotate" (entlast) "" pt1 "Copy" "R" pt1 pt2 pt3)
    )
    )
    )
    )
    A man who never made mistakes never made anything

  7. #7
    Junior Member
    Using
    AutoCAD 2012
    Join Date
    Jun 2011
    Posts
    11

    Default

    Registered forum members do not see this ad.

    BIGAL, thanks! That actually work better than what I was asking for since I can specify multiple copies as opposed to copying one, then copying 2, then copying 4, etc. I very much appreciate you taking the time to respond and write this little script up for me.

Similar Threads

  1. MOCORO (Move, copy, rotate) with reference angle?
    By SAFeSTeR in forum AutoCAD General
    Replies: 3
    Last Post: 30th Dec 2015, 11:05 pm
  2. Rotate with reference - - reference angle???
    By Lentezza in forum AutoCAD General
    Replies: 4
    Last Post: 16th Jan 2014, 10:14 am
  3. Rotate-Copy-Reference
    By nestly in forum The CUI, Hatches, Linetypes, Scripts & Macros
    Replies: 23
    Last Post: 10th Jan 2014, 03:26 am
  4. COPY or ** COPY ** - Copy and Stretch, Move, Rotate, Scale & Mirror objects
    By Andrew1979 in forum Tutorials & Tips'n'Tricks
    Replies: 2
    Last Post: 27th Jul 2009, 07:36 am
  5. Move/Rotate Copy/Rotate lsp
    By hiddenline in forum AutoCAD Beginners' Area
    Replies: 7
    Last Post: 19th Mar 2009, 11:12 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts