请教vla-put-Center 出错了,什么问题
[*]
[*](defun c:TT(/ ec area v_c)
[*](vl-load-com)
[*](setq ec(car (entsel "\n选择一个圆:")));获取圆的图元名
[*](setq pt(getpoint "\n输入圆的新的面积:"));
[*](setq v_c(vlax-ename->vla-object ec));将圆的图元名转换为VLA对象
[*](vla-put-Center v_c pt);更新圆的面积 这里出错,什么问题/
[*](princ)
[*])
(defun c:TT(/ ec area v_c)
(vl-load-com)
(setq ec(car (entsel "\n选择一个点:")));获取圆的图元名
(setq pt(getpoint "\n输入圆的新的点:"));
(setq newCenterPnt(vlax-make-safearray vlax-vbDouble '(0 . 2)))
(vlax-safearray-fill newCenterPnt pt);存下数据
(setq v_c(vlax-ename->vla-object ec));将圆的图元名转换为VLA对象
(vla-put-Center v_c newCenterPnt);更改圆的中心点
(vla-Update v_c);更新圆的中心点
(princ)
) 本帖最后由 LPACMQ 于 2018-3-2 19:31 编辑
(setq pt(vlax-3D-point pt))
页:
[1]