Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, i'm on a code for rotating entities to some especified angles whith a preview of the result and autocad crashes while running the command.
any idea to improve the code?
; http://www.theswamp.org/index.php?topic=12813.90 (defun fe-follow-mouse (_sset / pos_mouse pt_mouse pt) ;;(command "_.copy" _sset "" (list 0 0 0) (list 0 0 0)) (setvar "OSMODE" 0) (command) (setq pt (cadr (grread t 1 0))) (while (= (car (setq pos_mouse (grread t 1 0))) 5) (setq pt_mouse (cadr pos_mouse)) (command "_.erase" ss1 "") (command "_.erase" ss2 "") (command "_.erase" ss3 "") (if sect1 (progn (command "_.copy" _sset "" "0,0" "0,0") (setq ss1 (ssadd (entlast))))) (if sect2 (progn (command "_.copy" _sset "" "0,0" "0,0") (setq ss2 (ssadd (entlast))))) (if sect1 (progn (progn (command "_.copy" _sset "" "0,0" "0,0") (setq ss3 (ssadd (entlast)))))) (if sect1 (command "_.ROTATE" ss1 "" pt_mouse SECT1)) (if sect2 (command "_.ROTATE" ss2 "" pt_mouse SECT2)) (if sect3 (command "_.ROTATE" ss3 "" pt_mouse SECT3)) (grdraw pt pt_mouse 3 1) (setq pt pt_mouse) ) ) (defun c:rot () (setq SECT1 (getINT "SECT1 ")) (setq SECT2 (getINT "SECT2 ")) (setq SECT3 (getINT "SECT3 ")) (setq _sset (ssget)) (fe-follow-mouse _sset ) )
Solved! Go to Solution.