分享雙向偏移lsp 論壇獲益良多分享一個小程序。
(defun c:oo()
(setq en(car(entsel)))
(setq odist(getreal "\n请输入偏移距离"))
(setq huo(* -1 odist))
(setq obj(vlax-ename->vla-object en))
(vla-Offset obj odist)
(vla-Offset obj huo)
;(entdel en)
(princ)
)
(defun c:o2(/ ss i obj)
(if (not pykd) (setq pykd 40))
(setq pykd (cond ((getdist(strcat "\n输入宽度:"))) (pykd)))
(if (setq ss(ssget (list (cons 0 "line,arc,spline,lwpolyline,polyline,circle,ellipse"))))
(progn
(repeat (setq i(sslength ss))
(setq obj (vlax-ename->vla-object ...
↧