Lisp - Line,extend

Discussion of Common Lisp
Post Reply
adnegel
Posts: 1
Joined: Sat Aug 20, 2016 8:04 am

Lisp - Line,extend

Post by adnegel » Sat Aug 20, 2016 8:45 am

hello sorry but I will use a translator because not English .

I'm starting with Lisp doing simple things to practice but I have a problem with this routine that I can not get it to work .

I want to do is to draw a line , this line will automatically extend to the nearest point .

the problem is that when using two ( getpoint ) can not use Ortho to go straight , plus the line must go from right to left to run the " extend" command or from the top down

Try using the " line " command without giving values ​​but at the end of the command no longer continues to extend

This is the routine is very simple please do not laugh xD

(defun c:LE()

(command "pline" (getpoint) (getpoint) "")

(setq s1 (ssget "l"))

(command "extend" "" s1 "")

(princ)

)



I do not put image because it is something very simple
It is to use the " line " command and " extend" at the same time

pjstirling
Posts: 166
Joined: Sun Nov 28, 2010 4:21 pm

Re: Lisp - Line,extend

Post by pjstirling » Sun Aug 21, 2016 7:06 am

This code isn't base Common-Lisp, and it's not clear what this code is meant to interact with, is it a library, or some other lisp, like autocad?

Post Reply