Type ID on the command line then select the point...![]()


Registered forum members do not see this ad.
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.
Type ID on the command line then select the point...![]()


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
Last edited by aaryan; 1st Sep 2012 at 11:20 am.
Specify a point by function (getpoint) then retrieve the variable value with functions (car) , (cadr) and (caddr) .
- When aim is being settled in my mind , I have to reach it and get it in hand whatever it costs and wherever it is and will never give up . Tharwat said


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
Okay , if you want to specify a point on an entity , you can use the function (vlax-curve-getpointatdist <entity name> <distanse>) .
if not , just read about the function polar e.g (polar <point> <angle> <distance>) .
Tharwat
- When aim is being settled in my mind , I have to reach it and get it in hand whatever it costs and wherever it is and will never give up . Tharwat said


Thanks You So Much Tharwat.
Here's another way:
Code:(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) )Code:(defun c:test ( / e ) (if (setq e (car (entsel))) (_getpoint e 50.0)) )
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper


Registered forum members do not see this ad.
Thank You So Much Lee Mac.
Regards
Aaryan
Bookmarks