AutoCAD顧問
還沒有註冊嗎...即日起免費註冊,所有最完整的AutoCAD討論、教學及資源都在論壇裡喔~

Join the forum, it's quick and easy

AutoCAD顧問
還沒有註冊嗎...即日起免費註冊,所有最完整的AutoCAD討論、教學及資源都在論壇裡喔~
AutoCAD顧問
Would you like to react to this message? Create an account in a few clicks or log in to continue.
分享雙向偏移lsp Ioaoe110分享雙向偏移lsp 2020-310分享雙向偏移lsp Oiu15010分享雙向偏移lsp 2020-211分享雙向偏移lsp Ia15010分享雙向偏移lsp Aizyao10分享雙向偏移lsp Uos15010分享雙向偏移lsp BPl3tjj分享雙向偏移lsp Ziao1510
分享雙向偏移lsp Oo-2-110分享雙向偏移lsp Zuoiy_10分享雙向偏移lsp Aizyao11分享雙向偏移lsp Iyb_1510分享雙向偏移lsp Aoe1-111分享雙向偏移lsp Uos15011分享雙向偏移lsp Aoe2da10分享雙向偏移lsp Aoe2da11分享雙向偏移lsp Aoe10

分享雙向偏移lsp

2 posters

向下

分享雙向偏移lsp Empty 分享雙向偏移lsp

發表 由 zhangcan0516 2018-11-16, 23:19

分享雙向偏移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输入宽度<" (rtos pykd 2 2)
">:"))) (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 (ssname ss(setq i(- i 1)))))
(vla-offset obj (/ pykd 2.0))
(vla-offset obj (/ pykd -2.0))
)
(princ)
)))
zhangcan0516
zhangcan0516
初級會員
初級會員

文章總數 : 81
年齡 : 33
來自 : 彰化
職業 : 結構工程師
愛好 : CAD,lisp,c,c++,vb
個性 : 温和
使用年資 : 5
使用版本 : 12
積分 : 1
經驗值 : 3867
威望值 : 36
注冊日期 : 2014-10-23
男 白羊座 羊

回頂端 向下

分享雙向偏移lsp Empty 回復: 分享雙向偏移lsp

發表 由 Tiger&蘋果爸 2018-11-18, 14:23

謝謝你的熱心分享~
讚啦!!

____________________________________________________________________________________
👉[好康]🎁加入專屬B取得大補帖及看2D+3D影片(點我)👈
分享雙向偏移lsp Sesa2011 分享雙向偏移lsp Youtub11 分享雙向偏移lsp Oiea2011 分享雙向偏移lsp Oe20011 分享雙向偏移lsp Fbi20011 分享雙向偏移lsp Line2011
Tiger&蘋果爸
Tiger&蘋果爸
系統管理員
系統管理員

文章總數 : 21077
年齡 : 48
來自 : 台北市文山區
職業 : AutoCAD顧問
愛好 : 蹓狗/戶外活動/拍照/吸貓
個性 : 幽默/樂觀/善良
使用年資 : 20↑
使用版本 : AutoCAD 2022
經驗值 : 88422
威望值 : 16930
注冊日期 : 2008-04-23
2D基礎函授 2D進階函授 3D基礎函授 https://i.servimg.com/u/f11/19/71/67/71/2d3d10.png2D+3D線上 顧問外掛程式 經典問與答讀者 藍鵲1號
2009聚會勳章 2010聚會勳章 2011聚會勳章 2012聚會勳章 2013勳章-2D基礎 2014聚會勳章 2015聚會勳章 2016聚會勳章 串連貼紙成功 男 水瓶座 兔

http://mypaper.pchome.com.tw/kv1012tiger

回頂端 向下

回頂端


 
這個論壇的權限:
無法 在這個版面回復文章
分享雙向偏移lsp Ioaoe110分享雙向偏移lsp 2020-310分享雙向偏移lsp Oiu15010分享雙向偏移lsp 2020-211分享雙向偏移lsp Ia15010分享雙向偏移lsp Aizyao10分享雙向偏移lsp Uos15010分享雙向偏移lsp BPl3tjj分享雙向偏移lsp Ziao1510
分享雙向偏移lsp Oo-2-110分享雙向偏移lsp Zuoiy_10分享雙向偏移lsp Aizyao11分享雙向偏移lsp Iyb_1510分享雙向偏移lsp Aoe1-111分享雙向偏移lsp Uos15011分享雙向偏移lsp Aoe2da10分享雙向偏移lsp Aoe2da11分享雙向偏移lsp Aoe10