Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Easy way to find a point on XLINE and LINE

20 REPLIES 20
SOLVED
Reply
Message 1 of 21
Anonymous
2085 Views, 20 Replies

Easy way to find a point on XLINE and LINE

Hi,

 

I have two questions for experts

 

1) Is there an easy way in LISP to calculate a mid point of a line and get an X, Y, Z coordinates for this point? I know I can pull end points from the entity data

 

(setq current_line (entsel "\n Select line")

(setq point1 (cdr (assoc 10 (entget (car current_line)))))

(setq point2 (cdr (assoc 11 (entget (car current_line)))))

 

2) I also would like to find X,Y,Z coordinates of a point on an xline located, say, 20 units away from xline origination point.

 

 Your input is highly appreciated

20 REPLIES 20
Message 21 of 21
Anonymous
in reply to: Kent1Cooper

Great explanation. Thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost