明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1945|回复: 7

[资源] 删除复合线重点程序

[复制链接]
发表于 2013-4-18 17:07 | 显示全部楼层 |阅读模式
本帖最后由 陈亚娣 于 2013-7-5 15:32 编辑


删除复合线重点程序(以前做测量时收集的程序,现借花敬佛分享给大家)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2013-4-18 20:28 | 显示全部楼层
你的(xy_lt)和(sh_ch)呢?
 楼主| 发表于 2013-4-19 11:08 | 显示全部楼层
wmz 发表于 2013-4-18 20:28
你的(xy_lt)和(sh_ch)呢?

下午给你补上。
 楼主| 发表于 2013-4-19 12:45 | 显示全部楼层
陈亚娣 发表于 2013-4-19 11:08
下午给你补上。

(defun xy_lt()
(setq po_all nil)
(setq nst2 (entget xylt))
(setq mmm (cdr (assoc '0 nst2)))
(if (or (= mmm "POLYLINE") (= mmm "LWPOLYLINE")) (progn
(setq ped (cdr (ASSOC '70 nst2)))
(if (< ped 6) (progn
(command "pedit" xylt "l" "on" "")
(setq nst2 (entget xylt))
(setq ped (cdr (ASSOC '70 nst2)))
);progn
);if
(cond ((= mmm "LWPOLYLINE")
(while (> (length nst2) 0)
(setq pp (nth 0 nst2))
(if (and (= (type (cdr pp)) (type (list 10.0 10.0))) (= (nth 0 pp) 10)) (progn
(setq pp (cdr pp))
(setq po_all (reverse po_all))
(setq po_all (cons pp po_all))
(setq po_all (reverse po_all))
)progn
);if
(setq nst2 (cdr nst2))
);while
)
((= mmm "POLYLINE")
(setq nst1 xylt)
(while (and (setq nst1 (entnext nst1)) (/= (cdr (assoc '0 (setq nst2 (ENTGET NST1)))) "SEQEND"))
(if (= (cdr (assoc '70 nst2)) (cdr (assoc '70 (entget (entnext xylt))))) (progn
(setq pp (cdr (assoc '10 nst2)))
(setq pp (reverse pp))
(setq pp (cdr pp))
(setq pp (reverse pp))
(setq po_all (reverse po_all))
(setq po_all (cons pp po_all))
(setq po_all (reverse po_all))
);progn
);if
);while
)
);cond
);progn
);if
);defun
;;复合线视窗函数
(defun sh_ch()
(setq p 0)
(while (< p (length po_all))
(setq x (car (nth p po_all)) y (cadr (nth p po_all)))
(if (= p 0) (setq xx x yx y xm x ym y)
(progn
(if (< x xx) (setq xx x))
(if (> x xm) (setq xm x))
(if (< y yx) (setq yx y))
(if (> y ym) (setq ym y))
);progn
);if
(setq p (+ p 1))
);while
(command "zoom" "w" (list (- xx 1) (- yx 1)) (list (+ xm 1) (+ ym 1)))
);defun
发表于 2013-7-3 22:45 | 显示全部楼层
请问,命令是什么?
 楼主| 发表于 2013-7-5 14:43 | 显示全部楼层
yjjyjj 发表于 2013-7-3 22:45
请问,命令是什么?

命令是:dexpo
发表于 2013-7-11 00:02 | 显示全部楼层
程序不好用,删不掉重复点
发表于 2014-4-3 19:22 | 显示全部楼层
感謝分享感謝分享感謝分享感謝分享
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-6-1 14:29 , Processed in 0.168910 second(s), 29 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表