Hi All,
I wrote this to draw "line" or "polyline".
Could you please help me on these questions:
1) The lines in red doesn't work. What is wrong? (i.e. it doesn't pass the call to draw "line" when click enter key without "L" or"P" input.)
2) Is the line in green necessary?
3) Is there anyother thing not making sense or incorrect?
Thanks in advance.
(defun c:TEST (/ LineType)
(initget "L P")
(while (setq LineType
(getkword "\n<L>ine or Polyline: ")
); end of setq
[color=red](if (not LineType)
(setq LineType "L")
)[/color]; end of if
(if (= LineType "L")
(command "._line" pause pause)
); end of if
(while (eq (getvar "cmdactive") 1)
(command pause)
); end of while
(if (= LineType "P")
(command "._pline" pause pause)
); end of if
(while (eq (getvar "cmdactive") 1)
(command PAUSE)
); end of while
[color=green](initget "L P")[/color]
); end of while
(princ)
)
PS. I can't show the texts in color in the code. Can someone point me out? Thanks.