This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Lisp - Line,extend

2 posts · 3181 views

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

Re: Lisp - Line,extend

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?