ranchen Posted March 12, 2010 Posted March 12, 2010 How to select a spline from model space, and get coordinates of two endpoints using Autolisp? Thanks a lot Waiting online Quote
lpseifert Posted March 12, 2010 Posted March 12, 2010 Look into the use of vlax-curve-getStartPoint and vlax-curve-getEndPoint Quote
MSasu Posted March 15, 2010 Posted March 15, 2010 Insert the code below into your routine: (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)) ) ) Regards, Quote
alanjt Posted March 18, 2010 Posted March 18, 2010 msasu, just so you know, you don't have to feed vla-objects to the vlax-curve-* functions; it will accept enames. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.