- 积分
- 7560
- 明经币
- 个
- 注册时间
- 2002-9-23
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
(defun CCO (/ SS CNT LAY)
(setq SS (ssget))
(setq CNT (sslength SS))
(princ (strcat "\n" (itoa CNT) " 找到."))
(while (/= lay "")
(setq LAY (getstring "\n請輸入層名 / <ENTER結束命令>: "))
(if (and (/= "" LAY) (tblsearch "LAYER" LAY))
(progn
(setq ss1 (ssget "p"))
(command "_.copy" SS1 "" "0,0" "0,0")
(command "_.change" SS1 "" "_p" "_la" LAY "")
(prompt
(strcat "\n" (itoa (sslength SS)) " 物件拷貝到圖層 " LAY)
)
)
(if (and (/= "" LAY) (= NIL (tblsearch "LAYER" LAY)))
(alert (strcat "沒有 \"" LAY "\" 這個圖層!!!"))
)
)
)
(princ)
)
----------------------------------------------
;這個程序現在有一個缺點就是不能復制到已關閉的圖層(第一個可以,接著就不行了),還望高手多多指教 |
|