谢谢pBe,我已经修改了你给我的:
- landowner: dialog
- {label = "Landowner Layer Creation";
- : edit_box
- {
- label = "Enter landowner name :";
- key = "name";
- alignment = centered;
- edit_limit = 45;
- edit_width = 50;
- }
- : button
- {
- key = "accept";
- label = "OK";
- is_default = true;
- fixed_width = true;
- alignment = centered;
- }
- : errtile
- {
- width = 34;
- }
- }
- (defun c:landowner (/ Layername LayerColor name)
- (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"))
- (setq dcl_id (load_dialog "landowner.dcl"))
- (if (not (new_dialog "landowner" dcl_id))
- (exit)
- );if
- (if *name1*
- (set_tile "name" *name1*)
- (set_tile "name" "Default")
- )
- (action_tile "name" "(setq *name1* $value)")
- (start_dialog)
- (unload_dialog dcl_id)
- (setq layername (strcat "CCC_LANDOWNER_"*name1*)
- LayerColor (acad_colordlg 1 nil))
- (entmake (list (cons 0 "LAYER")
- (cons 100 "AcDbSymbolTableRecord")
- (cons 100 "AcDbLayerTableRecord")
- (cons 2 Layername)
- (cons 62 LayerColor)
- (cons 70 0)))
- (setvar "clayer" layername)
- (command "._pline")
- (while (= 1 (logand 1 (getvar "cmdactive")))
- (command pause))
- (setq pline (entlast)
- elist (entget pline)
- )
- (command "_.draworder" pline "" "_F");<--set pline's draw order to front
- (setvar "hpname" "honey")
- (setvar "hpscale" 2)
- (command "-hatch" "S" pline "" "")
- (setvar "hpname" ".")
- (setvar "cmdecho" SUCE)
- (setvar "orthomode" SUOM)
- (setvar "osmode" SUSM)
- (setvar "angbase" SUAB)
- (setvar "angdir" SUAD)
- (setvar "clayer" SUCL)
- (setvar "cecolor" SUCR)
- (princ)
- )
从调色板中选择颜色时,您可以选择Truecolor或Index color
我不明白的是亮度值,你想要不同颜色的普林线边界和图案填充吗?如果是这样。其中一个是按实体着色,另一个是按层
- [color=slategray](unload_dialog dcl_id)[/color]
- [color=slategray](setq layername (strcat "CCC_LANDOWNER_"*name1*)[/color]
- [color=slategray]LayerColor [/color][color=blue](acad_truecolordlg '(62 . 7) nil))[/color]
- [color=slategray](entmake [/color][color=blue](vl-remove nil[/color]
- [color=slategray](list (cons 0 "LAYER")[/color]
- [color=slategray] (cons 100 "AcDbSymbolTableRecord")[/color]
- [color=slategray] (cons 100 "AcDbLayerTableRecord")[/color]
- [color=slategray] (cons 2 Layername)[/color]
- [color=blue](car LayerColor) [/color]
- [color=blue] (if (> (length LayerColor) 1)[/color]
- [color=blue] (car (cdr LayerColor))) [/color]
- [color=slategray] (cons 70 0)[color=blue])[/color]))[/color]
- [color=slategray](setvar "clayer" layername)[/color]
- [color=slategray]........................[/color]
这将pline转换为索引颜色,图案填充将保留为bylayer
否则,如果希望所有颜色保持按层,请为图案填充创建单独的层
所以顺便问一下,你是如何设置亮度的?你能告诉我怎么做吗? |