- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi!
I've found this lisp and it works properly 🙂
I give a circle/arc and given a distance, it rotates selected entities based on computed angle.
However, as I have different entities on different points, i have to constantly draw circles in order to perform required rotation.
Could anyone please change it to ask for a base point, a radius and a distance?
It would simplify my work a lot 🙂
The credits are given in the link where I found it 🙂
;https://www.cadtutor.net/forum/topic/51964-i-want-to-rotate-by-distance/
(defun roang ( / oldang obj1 rad centpt ang)
(setq oldang (getvar "aunits"))
(setvar "aunits" 3)
(princ "\nPick Arc or circle")
(setq obj1 (entget (car (entsel))))
(setq rad (cdr (assoc 40 obj1)))
(setq centpt (cdr (assoc 10 obj1)))
(setq ang (/ (getreal "\nEnter Arc distance") rad))
(princ "\nPick object to rotate")
(setq obj2 (entsel))
(command "rotate" obj2 "" centpt ang)
(setvar "aunits" oldang)
)
(roang)
Many thanks in advance 🙂
Solved! Go to Solution.