帮助将颜色更改为trueco
有人能帮我把Lisp程序改成真彩色吗??(defun c:HHatch (/ hcol pt1 clr)
(initget 1 "Gray Blue greeN Yellow Red Magenta Orange")
(if (and (setq hcol (getkword "\nEnter COLOR : "))
(setq clr (nth (vl-position hcol '("Gray" "Blue" "greeN" "Yellow" "Red" "Magenta" "Orange")) '(252 5 3 2 1 200 30)))
(setq pt1 (getpoint "\nSelect INTERNAL point: "))
)
(command "_-hatch" "Properties" "_Solid" "_COLOR" clr "" pt1 "")
)
(princ)
)
绿色=0176,80
黄色=255204,0
桃子=250192144
Lpink=255153153
Dpink=255102204 这是一个不适用于绿色的示例,但显示了混合颜色和真彩色以及整数和字符串的问题
(defun c:HHatch (/ hcol pt1 clr)
(initget 1 "Gray Blue greeN Yellow Red Magenta Orange")
(if (and (setq hcol (getkword "\nEnter COLOR : "))
(setq clr (nth (vl-position hcol '("Gray" "Blue" "greeN" "Yellow" "Red" "Magenta" "Orange")) '(252 5 "10,176,80" 3 2 1 200 30)))
(setq pt1 (getpoint "\nSelect INTERNAL point: "))
)
(if (< (strlen clr) 4)
(command "_-hatch" "Properties" "_Solid" "_COLOR" clr "" pt1 "")
(command "_-hatch" "Properties" "_Solid" "_COLOR" "T" clr "" pt1 "")
)
)
(princ)
)
几乎没时间了需要这样做
(defun c:HHatch (/ hcol pt1 clr)
(initget 1 "Gray Blue greeN Yellow Red Magenta Orange")
(if (and (setq hcol (getkword "\nEnter COLOR : "))
(setq clr (nth (vl-position hcol '("Gray" "Blue" "greeN" "Yellow" "Red" "Magenta" "Orange")) '("252" "5" "10,176,80" "3" "2" "1" "200" "30")))
(setq pt1 (getpoint "\nSelect INTERNAL point: "))
)
(if (< (strlen clr) 4)
(progn
(setq clri (atoi clr))
(command "_-hatch" "Properties" "_Solid" "_COLOR" clri "" pt1 "")
)
(command "_-hatch" "Properties" "_Solid" "_COLOR" "T" clr "" pt1 "")
)
)
(princ)
)
对不起,我刚刚回到我的帖子,非常感谢!!!我将更改代码。谢谢你老师教我
页:
[1]