To illustrate some points from the previous comments, consider the code below.
As for COND and why it doesn't proceed further than the condition, please look up COND in the help reference or in one of your books. Sometimes it helps to read up on a function in an isolated way just to get a clear picture of its specific behavior.
(defun c:nl (/ answer oldblip oldlayer oldplinewidth oldortho)
;;sm: Removing the "1" in INITGET allows GETKWORD to return nil, which
;;sm: means that the user simply hit enter or space (an empty input)
(initget "Three Double Single seCondary E600 F208")
;;sm: ^Therefore, we have to test if GETKWORD was given an input
;;sm: This can be done by wrapping it all into one CONDition:
(cond ((setq
answer (getkword "\nSelect Phase: Three/Double/Single/seCondary/E600/F208 <> ")
)
;;sm: OK, user gave an input that we can use.
;;sm: Now proceed. Set the environment and check the input.
;;sm: If the user hit enter, the code will not have gone
;;sm: this far and it will not be able to set his/her
;;sm: system variables (it is still inpolite to change
;;sm: them but that's another story :)
(setvar "osmode" 0)
(setvar "blipmode" 0)
(cond ((= answer "seCondary") ; Secondary
(setvar "plinewid" 0.5) ; set polyline width to 0.5
(setvar "clayer" "622") ; set layer to 622
(princ answer)
)
;;sm: Using Daron's suggestion of collecting all identical settings:
;;sm: (if you have plans of adding other statements to the conditions
;;sm: then please keep your existing structure!)
((or (= answer "Three") ; Three Phase
(= answer "Double") ; Double Phase
(= answer "Single") ; Single Phase
)
(setvar "plinewid" 0) ; set polyline width to 0
(setvar "clayer" "612") ; set layer to 612
(princ answer)
)
;;sm: Again, using Daron's suggestion:
((or (= answer "E600") ; 600/347V
(= answer "F208") ; 120/208V
)
(setvar "plinewid" 0) ; set polyline width to 0
(setvar "clayer" "622") ; set layer to 622
(princ answer)
)
)
)
)
(princ)
)