;;;;;;将所选的二维多义线、圆弧、直线尽可能连接为二维多段线.;;;(defun c:jointtopl (/ kst sset i pp d1 yn f1) (setvar "cmdecho" 0) (princ "\n选择欲连接的所有二维多义线、圆弧、直线:")(setq sset (ssget '((-4 . " "))) i 0) (while (< i (sslength sset))
;;;
;;;将所选的二维多义线、圆弧、直线尽可能连接为二维多段线.
;;;
(defun c:jointtopl (/ kst sset i pp d1 yn f1)
(setvar "cmdecho" 0)
(princ "\n选择欲连接的所有二维多义线、圆弧、直线:")(setq sset (ssget '((-4 . "
"))) i 0)
(while (< i (sslength sset))
(if (entget (setq ent (ssname sset i)))
(if (= (cdr (assoc 0 (entget ent))) "LWPOLYLINE") (vl-cmdf "_PEDIT" ent "J" ent "" "") (vl-cmdf "_PEDIT" ent "Y" "J" sset "" ""))
)
(setq i (1+ i))
)
(princ)
)
2楼
;;;
;;;批量向指定点偏移的程序 kkk
;;;
(defun C:kkk(/ jd sset i n sset1 tmp tmp1 dian1 dian2 dian3 dian4 k )
(setvar "cmdecho" 0)
(setq jd(getdist "\n 偏移量
: "))
(if (/= jd nil)
(progn (princ "\n选择欲偏移的实体:") (setq sset (ssget))
(setq pp(getpoint "\n偏移方向点:"))
(if (> (sslength sset) 25)(princ "\n 正在计算中,请稍候..."))
(setq i 0 n 0 )
(while (< i (sslength sset))
(setq tmp(ssname sset i))
(if (= (cdr(assoc 0 (entget tmp))) "LINE")
(progn (vl-cmdf "_offset" jd (cdr(assoc -1 (entget tmp))) pp "")
(setq n (1+ n))
)
)
(setq i(1+ i))
)
)
)
(princ (strcat "\n总共偏移了LINE线段" (rtos n 2 0) "条。"))(princ)
)
回复
3楼
:lol 楼主,再来一个可以把指定选取的图块,统计数量并把图块绘制表格及图例的lisp吧。
回复
4楼
不知道怎么用啊
谢谢楼主了
回复
5楼
这个很实用。顶一下
回复