1.  > 反应器

什么反应器最好用(什么反应器最好用的)

什么反应器最好用(什么反应器最好用的)

大家好,今天小编关注到一个比较有意思的话题,就是关于什么反应器最好用的问题,于是小编就整理了1个相关介绍什么反应器最好用的解答,让我们一起看看吧。

  1. 谁可以给我一些CAD的好用LISP程序?

1、谁可以给我一些CAD的好用LISP程序?

可以用反应器实现,前提是画线和输入文字必须用定义的函数一次性操作完成.lisp代码如下:

(vl-load-com)

(defunc:line_txt(/ptpt1pt2entlinehandtxtvlaobjtmp)

(setqpt1(getpoint"\n指定第一点:"))

(setqpt2(getpoint"\n指定下一点:"))

(setqpt(list(/( (carpt1)(carpt2))2)(/( (cadrpt1)(cadrpt2))2)(/( (caddrpt1)(caddrpt2))2)))

(command"._line"pt1pt2"")

(setqentline(entlast))

(setqvlaobj(cons(vlax-ename-gt;vla-objectentline)'()));;将直线转换为vla对象

(setqhandtxt'((0."text"))

handtxt(appendhandtxt(list(append'(10)pt1)))

handtxt(appendhandtxt(list(append'(11)pt)))

handtxt(appendhandtxt(list(cons40(getdist"\n指定高度:"))))

handtxt(appendhandtxt(list(cons721)))

handtxt(appendhandtxt(list(cons730)))

handtxt(appendhandtxt(list(cons50(anglept1pt2))))

handtxt(appendhandtxt(list(cons1(getstring"\n输入文字:gt;")))))

(entmakehandtxt)

(setqhandtxt(cdr(assoc5(entget(entlast)))))

(vlr-pers(vlr-object-reactorvlaobjhandtxt'((:vlr-modified.linemodefy))))

)

(defunlinemodefy(entlineenttxtparameter-list/ptpt1pt2)

(setqenttxt(entget(handent(vlr-dataenttxt))))

(setqentline(entget(vlax-vla-object-gt;enameentline)))

(setqpt1(cdr(assoc10entline))pt2(cdr(assoc11entline)))

(setqpt(list(/( (carpt1)(carpt2))2)(/( (cadrpt1)(cadrpt2))2)(/( (caddrpt1)(caddrpt2))2)))

(setqenttxt(subst(cons50(anglept1pt2))(assoc50enttxt)enttxt)

enttxt(subst(append'(10)pt1)(assoc10enttxt)enttxt)

enttxt(subst(append'(11)pt)(assoc11enttxt)enttxt))

(entmodenttxt)

)

也可以用属性块实现,将文字与直线定义成属性块,打开块编辑器,在参数选项板中设定点参数和旋转参数,在动作选项板中定义要执行的动作,……,具体的自己参照属性块的做吧。

到此,以上就是小编对于什么反应器最好用的问题就介绍到这了,希望介绍关于什么反应器最好用的1点解答对大家有用。

留言与评论(共有 0 条评论)
   
验证码: