Pugazh Posted November 1, 2018 Posted November 1, 2018 Hi Everyone! Help me! I just modify Rev-Cloud Lisp using "RECTANG" Command. I want to change last step! we need after finish Rev-Cloud to set Rotation "0" in "RECTANG" Command. (defun C:Revc () (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) ) (defun RtoD (nbrOfRadians) (/ (* nbrOfRadians 180.0) pi) ) (defun DtoR (nbrOfDegrees) (* (/ nbrOfDegrees 180.0) pi) ) (if (not (tblsearch "LAYER" "REV")) (entmakex '((0 . "LAYER") (100 . "AcDbSymbolTableRecord") (100 . "AcDbLayerTableRecord") (2 . "REV") (70 . 0) (62 . 10) (6 . "Continuous") ) ) ) (setvar 'clayer "REV") (setq oldosmode (getvar 'osmode)) (setq ang (getvar 'snapang)) (setvar 'osmode 0) (setq ang1 (cvunit ang "radians" "degrees")) (command "_.rectang" pause "R" ang1 pause) (while (> (getvar 'CmdActive) 0) (command pause)) (setq rec (entlast)) (setq arc (getvar 'DIMSCALE)) (initget "Yes No") (setq cloud (getkword "Reverse Cloud direction [Yes/No] <No>: ") cloud (cond (cloud) (T "No")); No for Enter ) (command "_.REVCLOUD" "_Style" "_Normal" "_Arc" (* arc 2.5) "" "_Object" rec cloud) (command "_.rectang" "_none" "0,0" "R" 0 "_none" "0,0") (setq del (entlast)) (command "_.erase" del "") (setvar "clayer" "0") (setvar 'osmode oldosmode) (vl-load-com) (princ) ) Quote
Jef! Posted November 2, 2018 Posted November 2, 2018 Hi there! Between the (vl-load-com) and the (princ) lines (at the end), add these 2 lines (command "_.rectang" "0,0" "R" "0" "1,1") (entdel (entlast)) it will leave the rotation of rectangle at 0 after execution. If this solves your problem, please mark this reply accordingly. Thanks and cheers. 1 Quote
Pugazh Posted November 3, 2018 Author Posted November 3, 2018 (edited) Hi Jef! Thanks for your's help!.Now it's working fine. Edited November 3, 2018 by Pugazh Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.