guitarguy1685 Posted July 13, 2011 Share Posted July 13, 2011 I want to create a lisp for drawing shear wall lines. I was thinking of creating a line based on xy points from one line of a polyline. My problem is I can't figure out how to get the infro from a specific line. when I select a polyline and use getent I see all the points but I don't know which is which. They all have the ASSOC number of 10. how can I get the info of the line my pick box is on? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 13, 2011 Share Posted July 13, 2011 The easiest way is to use the vlax-curve-* functions, here is a verbose example: (defun c:test ( / select entity point param ) (if (and (setq select (entsel)) (eq "LWPOLYLINE" (cdr (assoc 0 (entget (setq entity (car select)))))) ) (progn (setq point (vlax-curve-getclosestpointto entity (cadr select)) param (vlax-curve-getparamatpoint entity point) param (fix param) ) (list (vlax-curve-getpointatparam entity param) (vlax-curve-getpointatparam entity (1+ param)) ) ) ) ) Quote Link to comment Share on other sites More sharing options...
Tharwat Posted July 13, 2011 Share Posted July 13, 2011 Take a look about functions that start with vlax-curve-........ which are much easier than dealing with assoc 10 entity to gather the needed coordinate points on a polyline in many situations . Quote Link to comment Share on other sites More sharing options...
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.