Results 1 to 8 of 8

Thread: Rotate or Scale Multiple Objects using each Object's Insert [snap] point

  1. #1
    Wish List Administration
    Join Date
    2011-08
    Posts
    4,581

    Default Rotate or Scale Multiple Objects using each Object's Insert [snap] point

    Summary: Rotate or Scale Multiple Objects using each Object's Insert [snap] point

    Description: I would like the capability of selecting multiple objects and modifying them using
    "in place". The final action would be "similar" to scaling a block or a text element used many times by redefining the block (let's say you scale them 2X), except the objects would all be different. Now you have to select each object, pick scale, enter snap on a point (let's say the insert snap) and enter the scale.

    I want to select all the objects I want to modify, select scale and when prompted for "base point" I want to use "ALL OBJECT INSERT SNAP POINTS".

    Product and Feature: AutoCAD - Modify

    Submitted By: Rick Witt on 05/01/2015


  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719

    Default Re: Rotate or Scale Multiple Objects using each Object's Insert [snap] point

    Quote Originally Posted by Wish List System View Post
    Summary: Rotate or Scale Multiple Objects using each Object's Insert [snap] point

    Description: I would like the capability of selecting multiple objects and modifying them using
    "in place". The final action would be "similar" to scaling a block or a text element used many times by redefining the block (let's say you scale them 2X), except the objects would all be different. Now you have to select each object, pick scale, enter snap on a point (let's say the insert snap) and enter the scale.

    I want to select all the objects I want to modify, select scale and when prompted for "base point" I want to use "ALL OBJECT INSERT SNAP POINTS".

    Product and Feature: AutoCAD - Modify

    Submitted By: Rick Witt on 05/01/2015
    Scaling a selection of one or more Block References (aka INSERT) by each Block Reference's Insertion Point is pretty simple:

    Select the blocks, and in Properties Pane, enter the appropriate X, Y, Z scale factor... Or write a simple LISP routine to preclude the need for Properties Pane.



    Now... Scaling myriad Object Types (i.e., Block Reference, MLeader, Dimension, etc), simultaneously in the same 'Command' is quite a bit more complex, but can be done.

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  3. #3
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,570

    Default Re: Rotate or Scale Multiple Objects using each Object's Insert [snap] point

    The same for rotation, just use the Properties manager.

  4. #4
    Member
    Join Date
    2010-09
    Posts
    8

    Default Re: Rotate or Scale Multiple Objects using each Object's Insert [snap] point

    Many objects do not have "rotation" or "scale" variables in the Properties manager. For example, polylines (open or closed).
    Also, I want this control for all objects not just inserted Blocks.
    Using the Insert point of an object is only an example. Why not use the mid-point of a line or polyline?

  5. #5
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719

    Default Re: Rotate or Scale Multiple Objects using each Object's Insert [snap] point

    Quote Originally Posted by wittr View Post
    Many objects do not have "rotation" or "scale" variables in the Properties manager. For example, polylines (open or closed).
    Also, I want this control for all objects not just inserted Blocks.
    Using the Insert point of an object is only an example. Why not use the mid-point of a line or polyline?
    Welcome to AUGI, and thanks for clarifying your wish.

    I'm not sure that you're understanding how to perform the task you're requesting, and the inherent properties of entities to which you're wanting to apply this functionality.



    As example, how would you go about batch rotating multiple Polylines by Midpoint, with Polylines having 3 or more vertices (which Midpoint do you use)?



    To help with only _some_ of the functionality you're after, here's a quick LISP that will allow you to batch rotate Arcs, Lines, and Polylines with only 2 vertices, by End, Mid, or Start (the first End):

    Code:
    (vl-load-com)
    
    (defun c:FOO (/ *error* opt ang acDoc)
    
      (defun *error* (msg)
        (if acDoc (vla-endundomark acDoc))
        (cond ((not msg))                                                   ; Normal exit
              ((member msg '("Function cancelled" "quit / exit abort")))    ; <esc> or (quit)
              ((princ (strcat "\n** Error: " msg " ** ")))                  ; Fatal error, display it
        )
        (princ)
      )
    
      (if
        (and
          (ssget "_:L"
                 '((-4 . "<OR")
                   (-4 . "<AND")(0 . "ARC,LINE")(-4 . "AND>")
                   (-4 . "<AND")(0 . "LWPOLYLINE")(90 . 2)(-4 . "AND>")
                   (-4 . "OR>")
                  )
          )
          (not (initget 1 "End Mid Start"))
          (setq opt (getkword "\nEnter roation point [End/Mid/Start]: "))
          (setq ang (getreal "\nEnter rotation angle (in degrees): "))
        )
         (progn
           (vla-startundomark
             (setq acDoc (vla-get-activedocument (vlax-get-acad-object)))
           )
           (vlax-for x (vla-get-activeselectionset acDoc)
             (vla-rotate
               x
               (vlax-3d-point
                 (cond
                   ((= "End" opt) (vlax-curve-getendpoint x))
                   ((= "Mid" opt)
                    (vlax-curve-getpointatparam
                      x
                      (/ (vlax-curve-getendparam x) 2.)
                    )
                   )
                   (T (vlax-curve-getstartpoint x))
                 )
               )
               (* pi (/ ang 180.0))                                   ; degrees to radians
             )
           )
         )
      )
    
      (*error* nil)
    )


    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  6. #6
    Member
    Join Date
    2010-09
    Posts
    8

    Default Re: Rotate or Scale Multiple Objects using each Object's Insert [snap] point

    Thank you for the reply and the LISP file. I do understand the complexity and limitations of the Wish. There would certainly be a number of objects that could not be manipulated without creating Blocks and insert points. Even Rectangles and Closed Polylines, which are not complex and should have Insert points by their creation and definition, cannot be rotated in the Properties Manager.

  7. #7
    Active Member
    Join Date
    2001-12
    Location
    North Carolina, USA
    Posts
    52

    Default Re: Rotate or Scale Multiple Objects using each Object's Insert [snap] point

    Polylines and lines and circles and other stuff don't have "insertion points". Midpoints of lines and polylines are relatively arbitrary points. Anything with an insertion point can be manipulated as a group by the properties palette. The wish would need to be modified in order to make sense. Even for objects, such as text that have insertion points, granting this wish would be problematic. For example, two single line text entities that were each scaled by their own insertion point would overlap one another. Most of the need for this wish is available by annotative scaling IMO. I don't understand how this wish made it to the top 30.

  8. #8
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095

    Default Re: Rotate or Scale Multiple Objects using each Object's Insert [snap] point

    Quote Originally Posted by dbroad View Post
    I don't understand how this wish made it to the top 30.
    Wish(list)ful thinking, perhaps? Everyone assuming that the point of rotation/scaling/etc. of various entity types would somehow be selected by the users own criteria, rather than some other users criteria.

Similar Threads

  1. Replies: 3
    Last Post: 2014-03-26, 08:19 PM
  2. Replies: 5
    Last Post: 2012-12-10, 07:10 PM
  3. Replies: 21
    Last Post: 2012-10-10, 02:38 PM
  4. Rotate objects by insertion point
    By spattn in forum VBA/COM Interop
    Replies: 6
    Last Post: 2011-11-05, 05:24 AM
  5. Snap pipe network object to survey point
    By Mike S in forum AutoCAD Civil 3D - Pipes
    Replies: 5
    Last Post: 2010-09-15, 12:48 PM

Posting Permissions

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