如何从mo中选择样条线
如何从模型空间中选择样条曲线,并使用Autolisp获取两个端点的坐标?谢谢正在联机等待 研究vlax curve getStartPoint和vlax curve getEndPoint的使用 在您的例程中插入以下代码:
(setq SplineEntity (ssget "_:S" '((0 . "SPLINE")))) ;select spline entity (filter out other)
(if (= (sslength SplineEntity) 1) ;test if valid user selection
(progn
(setq SplineEntity (ssname SplineEntity 0)
SplineEntVLA (vlax-ename->vla-object SplineEntity)) ;convert spline to VLA object
(setq SplineEnd1st (vlax-curve-getStartPoint SplineEntity) ;list spline's endpoints
SplineEnd2nd (vlax-curve-getEndPoint SplineEntity))
)
)
当做 msasu,正如你所知,你不必把vla对象馈送到vlax曲线-*函数;它将接受enames。
页:
[1]