- (defun py_ln(a1/ a2 pt b1 b210 b70 n a_last lst1 lst2 b4 ssa)
-->- (defun py_ln(a1 / a2 pt b1 b210 b70 n a_last lst1 lst2 b4 ssa)
----
第一段的osmode建议改成- ;;;;打散多义线 ----lsx.2013.12
- ;调用方法:(py_ln1(car(entsel)))
- (defun py_ln1(a1 / a2 p1 pt i a_last ssa old_os)
- (setq old_os(getvar "osmode"))
- (setvar "osmode" 0)
- (setq a2(entget a1)p1(assoc 10 a2)i 0 a_last(entlast)ssa(ssadd))
- (while p1(setq pt(cons(cdr p1)pt)a2(cdr(member p1 a2))p1(assoc 10 a2)));while
- (setq pt(reverse pt)ssa(ssadd a1 ssa))
- (repeat(-(length pt)1)(setq i(1+ i))(command"break"(entlast)(trans(nth i pt)0 1)(trans(nth i pt)0 1)))
- (setvar "osmode" old_os)
- (while(setq a_last(entnext a_last))(setq ssa(ssadd a_last ssa)));while
- )
关于osmode还有更好的方式一会找一下。
|