I tried to integrate that but now it stops when I select my method.Would be able to have a look and spot the problem?
(defun C:dyl (/ ang coords elist midp offsetted offsetted1 ofpt p1 p2 p3 pline side SUCE SUOM SUSM SUAB SUAD SUCL SUCR)(setq SUCE (getvar "cmdecho")) (setq SUOM (getvar "orthomode")) (setq SUSM (getvar "osmode")) (setq SUAB (getvar "angbase")) (setq SUAD (getvar "angdir")) (setq SUCL (getvar "clayer")) (setq SUCR (getvar "cecolor"))(command "_.-layer" "_N" "CCC_LAYOUT_Proposed_Road_Lining_Yellow_Lines" "_C" "2" "CCC_LAYOUT_Proposed_Road_Lining_Yellow_Lines" "" )(setvar "clayer" "CCC_LAYOUT_Proposed_Road_Lining_Yellow_Lines")(setvar "cecolor" "1")(initget "D S")(getkword "\nChoose Draw line or Select line method: : ")(cond ((= option "D")(yellow_draw))((= option "S")(yellow_select))));;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;(defun yellow_select ()(setq pline(entsel "\nSelect a kerb line: "))(yellow_resume));;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;(defun yellow_draw ()(command "._pline")(while (= 1 (logand 1 (getvar "cmdactive")))(command pause))(setq pline (entlast)elist (entget pline))(setvar "cecolor" "Bylayer")(command "_.draworder" pline "" "_F"); You are checking against a 'option' variable but you are NOT defining the variable with your getkword statement. Yeah, that was it.Thanks for the bailout again.
页:
1
[2]