jinaiming
发表于 2013-9-2 10:26:52
绝对支持源码
用户3766035971
发表于 2014-3-30 13:21:49
谢谢!支持!以后会有用到的时候
asd19400
发表于 2014-9-2 00:53:19
做块的时候 已取消标注!; 错误: *error* 函数中出错AutoCAD 变量设置被拒绝: "nomutt" nil
xyp1964
发表于 2014-9-3 09:34:37
机械工程师
发表于 2014-9-30 08:12:39
我做了如下改动以支持spline,但没效果,请指教
;;;;;;组合物体中各图元特性
(cond((= etype "LINE")
(setq texing(fixnum(vla-get-length vla_e)))
)
((= etype "SPLINE")
;spline 不能使用vla-get-length
;(setq texing(fixnum(vla-get-length vla_e)))
(setq texing(fixnum
;(vla-get-length vla_e)
(distance
(vlax-curve-getStartPoint vla_e)
(vlax-curve-getEndPoint vla_e)
)
))
;(distance (vlax-curve-getStartPoint (setq vla_e (vlax-ename->vla-object (car (entsel))))) (vlax-curve-getEndPoint vla_e))
)
((= etype "LWPOLYLINE")
(setq texing(fixnum(vla-get-length vla_e)))
)
((= etype "CIRCLE")
(setq texing (fixnum(vla-get-radius vla_e)))
)
((= etype "ARC")
(setq texing(fixnum(vla-get-arclength vla_e)))
)
((= etype "ELLIPSE")
(setq texing (fixnum(vla-get-RADIUSRATIO vla_e)))
)
((or(= etype "TEXT")(= etype "MTEXT"))
(setq texing(vla-get-textstring vla_e))
)
((= etype "INSERT")
(setq texing(vla-get-name vla_e))
)
((= etype "HATCH")
(setq texing (fixnum(vla-get-area vla_e)))
)
((= etype "SOLID")
(setq texing (length(vlax-safearray->list(vlax-variant-value(vla-get-coordinates vla_e)))))
)
(T
(setq texing etype)
)
)
(cond((= etype "LINE")
(setq texing(fixnum(vla-get-length vla_e)))
(setq as_e(strcat etype (rtos texing 2 5)))
(findm2mp AS_E)
(SETQ lst_texing NIL)
)
((= etype "SPLINE")
;(setq texing(fixnum(vla-get-length vla_e)))
(setq texing(fixnum
;(vla-get-length vla_e)
(distance
(vlax-curve-getStartPoint vla_e)
(vlax-curve-getEndPoint vla_e)
)
))
(setq as_e(strcat etype (rtos texing 2 5)))
(findm2mp AS_E)
(SETQ lst_texing NIL)
)
((= etype "LWPOLYLINE")
(setq texing(fixnum(vla-get-length vla_e)))
(setq as_e(strcat etype (rtos texing 2 5)))
(findm2mp AS_E)
(SETQ lst_texing NIL)
)
((= etype "CIRCLE")
(setq texing(fixnum(vla-get-radius vla_e)))
(setq as_e(strcat etype (rtos texing 2 5)))
(findm2mp AS_E)
(SETQ lst_texing NIL)
)
((= etype "ARC")
(setq texing (fixnum(vla-get-arclength vla_e)))
(setq as_e(strcat etype (rtos texing 2 5)))
(findm2mp AS_E)
(SETQ lst_texing NIL)
)
((= etype "ELLIPSE")
(setq texing (fixnum(vla-get-RADIUSRATIO vla_e)))
(setq as_e(strcat etype (rtos texing 2 5)))
(findm2mp AS_E)
(SETQ lst_texing NIL)
)
((or(= etype "TEXT")(= etype "MTEXT"))
(setq texing(vla-get-textstring vla_e))
(setq as_e (strcat etype texing))
(if(= etype "TEXT")
(progn
(findm2mp AS_E)
)
(progn
(findm2mp AS_E)
)
)
(SETQ lst_texing NIL)
)
((= etype "INSERT")
(setq texing (vla-get-name vla_e))
(setq as_e (strcat etype texing))
(findm2mp AS_E)
(SETQ lst_texing NIL)
)
((= etype "HATCH")
(setq texing (fixnum(vla-get-area vla_e)))
(setq as_e(strcat etype (rtos texing 2 5)))
(findm2mp AS_E)
(SETQ lst_texing NIL)
)
((= etype "SOLID")
(setq texing (length(vlax-safearray->list(vlax-variant-value(vla-get-coordinates vla_e)))))
(setq as_e(strcat etype (rtos texing 2 5)))
(findm2mp AS_E)
(SETQ lst_texing NIL)
)
(T
(setq texing etype)
(setq as_e (strcat etype texing))
(findm2mp AS_E)
(SETQ lst_texing NIL)
)
)
aisr花园
发表于 2014-10-20 20:21:32
感谢分享...不错
lingduwx
发表于 2015-9-12 10:28:28
要是能把物体组成块就好了,不是所有选择出来组成一个大块,是希望把相同组合体选择出来组块
冒个烟圈
发表于 2015-10-29 20:02:01
很好用的程序,,谢谢楼主分享。。
sowin
发表于 2017-11-2 16:51:32
谢谢楼主分享!非常感谢楼主!
开心68602
发表于 2018-5-1 17:07:39
老师:我用这个命令时提示
命令: xse
; 错误: no function definition: VLAX-GET-ACAD-OBJECT
怎么处理?