aaryan Posted September 1, 2012 Posted September 1, 2012 Hi All, Please help me to find the coordinate of a point at a given distance before the first vertex of a polyline through autolisp. Hope its clear, if not please ask i'll attach a sample drawing. Thanks and Regards Aaryan. Quote
kaizen Posted September 1, 2012 Posted September 1, 2012 Type ID on the command line then select the point... Quote
aaryan Posted September 1, 2012 Author Posted September 1, 2012 (edited) Thanks kaizen for your reply, but i want to know it through autolisp. Below I've attached the drawing for the reference. Drawing5.dwg Regards Edited September 1, 2012 by aaryan Quote
Tharwat Posted September 1, 2012 Posted September 1, 2012 Specify a point by function (getpoint) then retrieve the variable value with functions (car) , (cadr) and (caddr) . Quote
aaryan Posted September 1, 2012 Author Posted September 1, 2012 Thanks Tharwat, I think I've not made it clear before. Please see my 3rd post in which i have attached a drawing for reference. Thanks again Regards Quote
Tharwat Posted September 1, 2012 Posted September 1, 2012 Okay , if you want to specify a point on an entity , you can use the function (vlax-curve-getpointatdist ) . if not , just read about the function polar e.g (polar ) . Tharwat Quote
Lee Mac Posted September 1, 2012 Posted September 1, 2012 Here's another way: (defun _getpoint ( ent dis / der ) (setq der (vlax-curve-getfirstderiv ent (vlax-curve-getstartparam ent)) dis (/ dis (distance '(0.0 0.0 0.0) der)) ) (mapcar '(lambda ( a b ) (- a (* dis b))) (vlax-curve-getstartpoint ent) der) ) (defun c:test ( / e ) (if (setq e (car (entsel))) (_getpoint e 50.0)) ) Quote
aaryan Posted September 1, 2012 Author Posted September 1, 2012 Thank You So Much Lee Mac. Regards Aaryan 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.