woodman78 发表于 2022-7-6 10:15:15

您正在对照“option”变量进行检查,但没有使用getkword语句定义变量。

woodman78 发表于 2022-7-6 10:18:20

是的,就是这样。再次感谢救助。

alanjt 发表于 2022-7-6 10:20:32

Lee Mac 发表于 2022-7-6 10:23:28

http://lee-mac.com/promptwithdefault.html

woodman78 发表于 2022-7-6 10:28:21

Thanks Alanjt,
 
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");

alanjt 发表于 2022-7-6 10:33:54

You are checking against a 'option' variable but you are NOT defining the variable with your getkword statement.

woodman78 发表于 2022-7-6 10:37:16

Yeah, that was it.Thanks for the bailout again.
页: 1 [2]
查看完整版本: 选择pline