Author Topic: Does anyone have a block rotate lisp?  (Read 6361 times)

0 Members and 1 Guest are viewing this topic.

hudster

  • Gator
  • Posts: 2848
Does anyone have a block rotate lisp?
« on: April 13, 2004, 06:58:39 AM »
I'm looking for a lisp which will let me rotate all selected blocks, but at each individual block insertion point, rather than rotating everything at one insertion point.

If anyone has a lisp which can do this can you please post it here.

cheers

Andy
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

hendie

  • Guest
Does anyone have a block rotate lisp?
« Reply #1 on: April 13, 2004, 07:54:02 AM »
you can do that through the "Properties" dialogue box ~ the Rotation is defined under the Miscellaneous section

hudster

  • Gator
  • Posts: 2848
Does anyone have a block rotate lisp?
« Reply #2 on: April 13, 2004, 07:56:46 AM »
Cool.

Cheers
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Does anyone have a block rotate lisp?
« Reply #3 on: April 13, 2004, 08:02:14 AM »
I have one I can send you in email, but it will have to wait until I get home so I can get access to my computer.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

hendie

  • Guest
Does anyone have a block rotate lisp?
« Reply #4 on: April 13, 2004, 08:09:26 AM »
Quote from: Keith
......but it will have to wait until I get home so I can get access to my computer.


and you posted this by ...





    ....
telepathy ?[/list:u]

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Does anyone have a block rotate lisp?
« Reply #5 on: April 13, 2004, 08:21:23 AM »
I am at work and I don't have it here....
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

daron

  • Guest
Does anyone have a block rotate lisp?
« Reply #6 on: April 13, 2004, 10:34:23 AM »
Code: [Select]
(defun geninfo ()
     (setq ename (ssname ss cnt)
  elist (entget ename)
  insp (cdr (assoc 10 elist))
  cnt (1+ cnt)
     ) ;_ SETQ
)

(defun c:rbi ()
     (setq ss  (ssget)
  cnt 0
     )
     (if (>= (setq ang (getangle "\nSpecify reference angle <0>: ")) 0.0)
 (setq ang ang)
 (setq ang 0.0)
     )
     (setq curval (angtos ang 0 2)
  newval (angtos (getorient "\nSpecify new angle: ") 0 2)
     )
     (repeat (sslength ss)
 (geninfo)
 (command ".rotate" ename "" insp "R" curval newval)
     )
     (princ)
)

Will this do? I haven't used it in a long time, but I think that is what I wrote it for.

hyposmurf

  • Guest
Does anyone have a block rotate lisp?
« Reply #7 on: April 13, 2004, 02:52:36 PM »
:D Something I've always wanted to do,being able to rotate mutliple objects with one base point.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Does anyone have a block rotate lisp?
« Reply #8 on: April 13, 2004, 05:31:35 PM »
Ok try this one....

Code: [Select]

;;;----------------------------------------------------------------------------
;;;
;;;   RMANY.LSP   Version 2.0
;;;
;;;   Copyright (C) 1998-2004 by K. Blackie
;;;
;;;   Permission to use, copy, modify, and distribute this software
;;;   for any purpose and without fee is hereby granted, provided
;;;   that the above copyright notice appears in all copies and that
;;;   both that copyright notice and this permission notice appear in
;;;   all supporting documentation.
;;;
;;;   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.
;;;
;;;   14 March 1998
;;;   26 November 1999
;;;   12 January 2004
;;;  
;;;----------------------------------------------------------------------------
;;;   DESCRIPTION
;;;----------------------------------------------------------------------------
;;;   C:RMANY
;;;
;;;   This function allows a user to rotate many objects at once by
;;;   selecting several objects and then specifying a rotation angle.
;;;   Note however that the rotation angle will be from the current
;;;   angle of the entity, ie. if the current angle is 45 degrees and
;;;   you specify rotation of 45 degrees the new angle of the entity
;;;   will be 90 degrees.
;;;  
;;;   Changes in version 2.0 include the ability to select a multiple
;;;   number of entities and rotate them individually around its own
;;;   axis at a specified angle or rotate them individually by specifying
;;;   an angle for each entity. This option puts the object at the angle
;;;   specified from 0 degrees
;;;
;;;----------------------------------------------------------------------------


(defun C:RMANY( / ss ans oce)
 (setq oce (getvar "CMDECHO"))
 (setvar "CMDECHO" 0)
 (princ "\nSelect objects to rotate: ")
 (setq ss (ssget))
 (initget "Each Auto")
 (setq ans (getkword "\nEach/<Auto>: "))
 (do_each ans ss )
 (setvar "CMDECHO" oce)
)

(defun do_each ( eoa ss / ssl rpt ca ra i do-once )
 (setq ssl (sslength ss))
 (setq i 0)
 (repeat ssl
  (setq rpt(cdr(assoc 10(entget(setq e(ssname ss i))))))
  (cond
      ((= eoa "Each")(setq ra (getangle rpt "\nRotation angle: ")))
      ((not do-once)(setq ra (getstring "\nRotation angle: "))(setq do-once T))
  )
  (if do-once
      (command "rotate" e "" rpt ra)
      (progn
       (if (= (cdr(assoc 50 (entget e))) nil)
              (entmod (subst (cons 11 (polar rpt ra (distance rpt (cdr(assoc 11(entget e)))))) (assoc 11 (entget e))(entget e)))
              (entmod (subst (cons 50 ra)(assoc 50 (entget e))(entget e)))
       )
      )
  )
  (setq i (+ 1 i))
 )
)
(princ "\n      -- Multiple Object Rotate  Ver. 2.0 -- start command with --> RMANY ")
(princ "\n      -- Copyright (C) 1998-2004 by K.E. Blackie ")
(princ)
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie