我想保留"-bhatch"命令的特性和选择功能,绘制一个填充图案,并将其加入到另一个特定图层,最后返回一开始的图层。
我搞了半天也搞不出来 ;|(defun C:YJ_Tiancong () (initget "s ") (setq p1 (getpoint "\n指定内部点或选择(S):")) (cond ((= s0 "s")((princ "\n指 择(S):" ))) ((= s0 "") nil) (t (cond ( (command "-layer" "N" "COLUFILL" "c" "9" "COLUFILL" "") (command "-BHATCH" "P" "SOLID" p1 "") (command "chprop" (entlast) "" "layer" "COLUFILL" "")))) ) (princ) )|; ;|
(defun C:YJ_Tiancong () (setq p1 (getpoint "\n指定内部点或选择(S):")) (command "-layer" "N" "COLUFILL" "c" "9" "COLUFILL" "") (command "-BHATCH" "P" "SOLID" p1 "") (command "chprop" (entlast) "" "layer" "COLUFILL" "") (princ) ) (setq ss (ssget)) (command "-layer" "N" "COLUFILL" "c" "9" "COLUFILL" "") (command "-BHATCH" "P" "SOLID" "s" ss "" "") (command "chprop" (entlast) "" "layer" "COLUFILL" "") (princ) |; (defun C:yjxd () (setq ss nil n 0) (while (setq ss1 (getpoint "\n指定内部点或选择(S):")) (setq ss (cons ss1 ss) (setq n (+ n 1)) ) (command "-BHATCH" "P" "SOLID" ss "")) (while (> n 0) ((nth n ss) (setq n (- n 1)
失败!
|