@Grover_Puma ,
Vea si esta aplicación cubre su necesidad:
;; RotateAboutCenters.lsp [command name = RAC]
;; To Rotate selected object(s) by a specified angle about each object's
;; center [the middle of its bounding box].
;; Kent Cooper, 23 January 2017
(vl-load-com)
(defun C:RAC ; = Rotate About Center(s)
(/ *error* doc svnames svvals ss ang ent)
(defun *error* (errmsg)
(if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break"))
(princ (strcat "\nError: " errmsg))
); end if
(mapcar 'setvar svnames svvals)
(vla-endundomark doc)
(princ)
); end defun - *error*
(vla-startundomark (setq doc (vla-get-activedocument (vlax-get-acad-object))))
(prompt "\nTo Rotate object(s) About Center(s),")
(setq
svnames '(osmode blipmode cmdecho)
svvals (mapcar 'getvar svnames)
ss (ssget ":L"); select object(s) to be Rotated
); setq
(if ss ; object(s) selected
(progn ; then
(setq ang (getangle "\nAngle to Rotate each object: "))
(mapcar 'setvar svnames '(0 0 0))
(command "_.undo" "_begin")
(repeat (setq inc (sslength ss))
(setq ent (ssname ss (setq inc (1- inc))))
(vla-getboundingbox (vlax-ename->vla-object ent) 'minpt 'maxpt)
(command "_.rotate" ent ""
(mapcar '/ (mapcar '+ (vlax-safearray->list minpt) (vlax-safearray->list maxpt)) '(2 2 2))
(angtos ang)
); command
); repeat
); progn -- then [outer]
(prompt "\nNothing selected to Rotate."); else
); if [ss exists]
(mapcar 'setvar svnames svvals); reset
(vla-endundomark doc)
(princ)
); defun -- C:RAC
(vl-load-com)
(prompt "\nType RAC to Rotate object(s) About Center(s).")
Select the "Mark as Solution" if my post solves your issue or answers your question.
Seleccione "Marcar como solución" si mi publicación resuelve o responde a su pregunta.
Emilio Valentin