subodh_gis Posted September 30, 2013 Share Posted September 30, 2013 (edited) i am new to forum in the below code Loop is not continue working when we choose Rotate option all other optional command are working properly . Please help (defun C:tt3 (/ input start rot count ang inc) (setq count (getint "Enter Starting No.: ")) (if (null count) (setq start 1)) (setq inc 1) (setq th (getreal "\nEnter text height: ")) (if (null th) (setq th 1.27)) ;; set continue flag to True (setq continue T) (while continue (initget 1 "R N D") ;; initialize user input (setq input (getpoint (strcat "\nInsertion point for number" "or [(R)otate/(N)ew]/(D)elete :"))) ;; get user input ;; evaluate user input (cond ;; user wants to Change NEW NUM ((= input "N") (setq new1 (getint "\nEnter New Number :") ) (setq count new1 ) (setq continue T)) ;; user wants to delete NUM ((= input "D") (command "ERASE" "l" "") (setq count (- count 1)) ) ;; user wants to Rotate number ((= input "R") ;(setq ang1 (getangle "Pick a point or enter angle: ")) (command "ROTATE" "L" "") (setq continue T)) ;; user must have picked a point (T ;; add text object (command "text" "s" "Standard" "mc" input th 0 count) (setq pt1 input) (setq count (+ count inc))) );;cond ) ;; While (princ) ) ;; Defunc please give me the suggestion on my email subodh.git@gmail.com Thanks in advance Edited September 30, 2013 by rkmcswain added [CODE] tags Quote Link to comment Share on other sites More sharing options...
Tiger Posted September 30, 2013 Share Posted September 30, 2013 Hi and welcome to the forum! Please read the Code Posting Guidelines (http://www.cadtutor.net/forum/showthread.php?9184-Code-posting-guidelines) and please use code-tags around your own. I would not recommend you leaving your email-adress in an open post like that, plus it's much better for the forum to have the answer and related discussion happen in this actual thread. Quote Link to comment Share on other sites More sharing options...
gS7 Posted September 30, 2013 Share Posted September 30, 2013 (edited) Subodh_Gis WelCome to CadTutor ! before Posting Codes ,Please Read Code Posting Guide (bellow Link) http://www.cadtutor.net/forum/showthread.php?9184-Code-posting-guidelines And Solution for Your Problem (Note: Highlighted In Blue Color) (defun C:tt3 (/ input start rot count ang inc pt ent [color="blue"][b]pt1[/b][/color]) (setq count (getint "Enter Starting No.: ")) (if (null count) (setq start 1)) (setq inc 1) (setq th (getreal "\nEnter text height: ")) (if (null th) (setq th 1.27)) ;; set continue flag to True (setq continue T) (while continue (initget 1 "R N D") ;; initialize user input (setq input (getpoint (strcat "\nInsertion point for number" "or [(R)otate/(N)ew]/(D)elete :"))) ;; get user input ;; evaluate user input (cond ;; user wants to Change NEW NUM ((= input "N") (setq new1 (getint "\nEnter New Number :") ) (setq count new1 ) (setq continue T)) ;; user wants to delete NUM ((= input "D") (command "ERASE" "l" "") (setq count (- count 1)) ) ;; user wants to Rotate number ((= input "R") ;(setq ang1 (getangle "Pick a point or enter angle: ")) (command "ROTATE" "L" "" [color="blue"][b] pt1 pause[/b][/color]) (setq continue T)) ;; user must have picked a point (T ;; add text object (command "text" "s" "Standard" "mc" input th 0 count) (setq pt1 input) (setq count (+ count inc))) );;cond ) ;; While (princ) ) ;; Defunc Edited September 30, 2013 by gS7 Quote Link to comment Share on other sites More sharing options...
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.