Jump to content

Recommended Posts

Posted

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.

Posted

Type ID on the command line then select the point...:)

Posted (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 by aaryan
Posted

Specify a point by function (getpoint) then retrieve the variable value with functions (car) , (cadr) and (caddr) .

Posted

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

Posted

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

Posted

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))
)

Posted

Thank You So Much Lee Mac.

 

Regards

Aaryan

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...