xubin_9705 发表于 2009-1-31 15:46:00

ENTSEL问题请教

<p>用ENTSEL点击在一根线上,怎么求出当前点的坐标在这根线的哪两个端点之间,请教一下,小弟有礼了,</p>

Andyhon 发表于 2009-1-31 21:38:00


(if (and
      (setq sel (entsel "\nSelect pline: "))
      (setq ent (car sel))
      (= (cdr (assoc 0 (entget ent))) "LWPOLYLINE")
    )
(setq pt (vlax-curve-getclosestpointto ent (cadr sel))
param1 (fix (vlax-curve-getparamatpoint ent pt))
param2 (1+ param1)
startpt (vlax-curve-getpointatparam ent param1)
endpt (vlax-curve-getpointatparam ent param2)
;; bulge1 (vla-getbulge (vlax-ename- )
         ;;do whatever with the data
)
)
ref link: http://www.rafal.waw.pl/cad/get-segment-data-selected-lwpolyline-out-exploding.html

xubin_9705 发表于 2009-2-1 13:25:00

谢谢了
页: [1]
查看完整版本: ENTSEL问题请教