调试帮助
大家好,有人用lisp沿多段线插入一个块,并指示多边形从端点到插入点的长度。问题是,该lisp没有选择多边形上最近的点来插入块。为了指示长度,块具有一个属性。当我插入块时,有人可以修改lisp以选择多段线上最近的点吗?谢谢
节点。lsp 快速编辑代码
(defun C:NODE (/ pick space inc); for Mark PolyLine with Distance
(setvar 'attdia 0)
(setq
pick (entsel "\nSelect Polyline at marker location:")
picknear (osnap (cadr pick) "nea")
pickname (car pick)
pton (vlax-curve-getClosestPointTo pickname picknear)
); end setq
(command
"_.insert"
"kilo10"
pton
"" "" "" ; scale factors and rotation
(rtos ; answer to attribute value prompt
(vlax-curve-getDistAtPoint pickname pton); end getDist
); end rtos
); end command
); end defun
页:
[1]