菜鸟请教取值问题
(defun c:tt ( / d obj )(setq d (getdist "\n偏移距离: "))
(while (setq obj (vlax-ename->vla-object (car(entsel))))
(progn
(vl-catch-all-apply 'vla-offset (list obj (- d)))
(vl-catch-all-apply 'vla-offset (list obj d))
(vl-Catch-All-Apply 'vlax-put-property (list obj 'color 1))
)
)
)
这两行里面的d值怎么取上面d的0.5倍。((setq d (getdist "\n偏移距离: ")))
(vl-catch-all-apply 'vla-offset (list obj (- d)))
(vl-catch-all-apply 'vla-offset (list obj d))
直接(* 0.5 d)不行吗 (defun c:tt ( / d obj )
(setq d (getdist "\n偏移距离: "))
(setq d (* 0.5 d))
(while (setq obj (vlax-ename->vla-object (car(entsel))))
(progn
(vl-catch-all-apply 'vla-offset (list obj (- d)))
(vl-catch-all-apply 'vla-offset (list obj d))
(vl-Catch-All-Apply 'vlax-put-property (list obj 'color 1))
)
)
) (defun c:tt ( / d obj )
(setq d (getdist "\n偏移距离: "))
(while (setq obj (vlax-ename->vla-object (car(entsel))))
(progn
(vl-catch-all-apply 'vla-offset (list obj (* -0.5 d)))
(vl-catch-all-apply 'vla-offset (list obj (* 0.5 d)))
(vl-catch-all-apply 'vlax-put-property (list obj 'color 1))
)
)
) 谢谢各位大佬指点
页:
[1]