只需一步,快速开始
小弟近来想编一个组件,需要各位大大帮忙.这个组件的功能是这样的.
选择一条园弧,自动求出它的两个端点,在这两点间画一条直线.
请大家帮忙,不胜感激.
我只会用最基本的LISP函数,太高级的不要吓我啊,呵呵
使用道具 举报
(defun c:tt (/ en) (if (and (setq en (entsel "\n选择圆弧: ")) (= (cdr (assoc 0 (entget (setq en (car en))))) "ARC") ) (progn (setvar "osmode" 0) (command "_.line" (vlax-curve-getStartPoint en) (vlax-curve-getEndPoint en) "" ) ) (princ "\n无效选择。") ) (princ))
很多谢楼上2位,又学到东西了.我能请你们吃饭吗?
又学到了一些东西
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 ) ©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途
GMT+8, 2025-11-5 04:33 , Processed in 0.176285 second(s), 26 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.