为下面的getvals3问题添加类似DCL的内容。lsp
- ; can add linetype if required
- (defun c:SetLayer ( / name col )
- (if (not AH:Getval3)(Load "getval3"))
- (ah:getval3 "Enter layer name"12 10 "New" "Enter Colour" 5 4 "3" "Enter Linetype"12 10 "Continuous")
- (setq name val1 col val2)
- (if (tblsearch "LAYER" name)
- (progn (prompt "Layer already exists, set as current.") (setvar "CLayer" name))
- (if (setq col (acad_colordlg 7 nil))
- (progn (entmake (list '(0 . "LAYER")
- '(100 . "AcDbSymbolTableRecord")
- '(100 . "AcDbLayerTableRecord")
- '(70 . 0)
- (cons 2 name)
- (cons 62 col)))
- ; add linetype here
- (prompt "Layer created and set current.")
- (setvar "CLayer" name))))
- (princ))
GETVALS3.lsp |