my_autocad 发表于 2007-10-16 22:04:00

[求助]修改所有图元的标高及厚度为0

<p>修改所有图元的标高及厚度为0</p><p>整理平面图时,常常因为有图元的标高及厚度不为0,导致填充不起,甚至测量不准,有没有一个lsp程序,可以把所有图</p><p>元的标高及厚度改为0啊?</p>

alin 发表于 2007-10-17 07:21:00

<p>Try FLATTEN</p>

willsnow1982 发表于 2007-11-18 09:53:00

<p>(defun C:qczz()<br/>&nbsp; (command "layer" "s" "0" "")<br/>&nbsp; (setq te (ssget "x" (list (cons 0 "text"))));全图文字<br/>&nbsp; (if te<br/>&nbsp;&nbsp;&nbsp; (command "change" te "" "p" "e" "0" "t" "0" "")<br/>&nbsp;&nbsp;&nbsp; )<br/>&nbsp; (setq bl (ssget "x" (list (cons 0 "insert"))));全图块<br/>&nbsp; (if bl<br/>&nbsp;&nbsp;&nbsp; (command "change" bl "" "p" "e" "0" "t" "0" "")<br/>&nbsp;&nbsp;&nbsp; )<br/>&nbsp; (setq pl (ssget "x" (list (cons 0 "polyline"))));全图多段线<br/>&nbsp; (if pl<br/>&nbsp;&nbsp;&nbsp; (command "change" pl "" "p" "e" "0" "t" "0" "")<br/>&nbsp;&nbsp;&nbsp; )<br/>&nbsp; (setq pw (ssget "x" (list (cons 0 "lwpolyline"))));全图轻量线<br/>&nbsp; (if pw<br/>&nbsp;&nbsp;&nbsp; (command "change" pw "" "p" "e" "0" "t" "0" "")<br/>&nbsp;&nbsp;&nbsp;&nbsp; ))<br/>&nbsp; (setq ln (ssget "x" (list (cons 0 "line"))));全图直线<br/>&nbsp; (if ln<br/>&nbsp;&nbsp;&nbsp; (command "change" ln "" "p" "e" "0" "t" "0" "")<br/>&nbsp;&nbsp;&nbsp; )<br/>&nbsp; (setq cr (ssget "x" (list (cons 0 "circle"))));全图圆<br/>&nbsp; (if cr<br/>&nbsp;&nbsp;&nbsp; (command "change" cr "" "p" "e" "0" "t" "0" "")<br/>&nbsp;&nbsp;&nbsp; )<br/>&nbsp; (setq ar (ssget "x" (list (cons 0 "arc"))));全图弧<br/>&nbsp; (if ar<br/>&nbsp;&nbsp;&nbsp; (command "change" ar "" "p" "e" "0" "t" "0" "")<br/>&nbsp;&nbsp;&nbsp; )<br/>&nbsp; (setq pt (ssget "x" (list (cons 0 "point"))));全图点<br/>&nbsp; (if pt<br/>&nbsp;&nbsp;&nbsp; (command "change" pt "" "p" "e" "0" "t" "0" "")<br/>&nbsp;&nbsp;&nbsp;&nbsp; ))<br/>&nbsp; (setq wt (ssget "x" (list (cons 0 "wipeout"))));全图消隐<br/>&nbsp; (if wt<br/>&nbsp;&nbsp;&nbsp; (command "change" wt "" "p" "e" "0" "t" "0" "")<br/>&nbsp;&nbsp;&nbsp;&nbsp; ))<br/>)<br/>&nbsp;&nbsp; </p><p></p><p>如果还有特殊的图元,自己改吧~</p><p></p>

jaminth 发表于 2007-11-18 13:00:00

页: [1]
查看完整版本: [求助]修改所有图元的标高及厚度为0