aHow do I write a simple lisp that allows me to make a single selection of
line, then have it sets the length of the line to a variable (setq x..
How do I write a simple lisp that allows me to make a single selection of a line, then have it sets the length of the line to a variable (setq x..
...If you already have set a length to a variable, say 'linelength', you can change the line length with the following:
(command "._lengthen" "_T" linelength pause "")
It will pause for a single selection, and will work on a line, polyline and arc.
Carl
"abevlad" wrote:
of a> How do I write a simple lisp that allows me to make a single selection
> line, then have it sets the length of the line to a variable (setq x..
???
What's that got with assigning the length of an existing line to a variable?
___
"CarlB" wrote:
> If you already have set a length to a variable, say 'linelength', you
> can change the line length with the following:
>
> (command "._lengthen" "_T" linelength pause "")
>
> It will pause for a single selection, and will work on a line,
> polyline and arc.
>
> Carl
>
...
On Wed, 16 Jan 2002 18:06:31 -0800, "Paul Turvill"
I see two interpretations of the request, the first being for a program that changes the length of the selected entity to the value of a variable set by user input. The second being selecting a line and assigning the value of its length to a variable.
How do I write a simple lisp that allows me to make a single selection of a line, then have it sets the length of the line to a variable (setq x..
..."abevlad" wrote:
of a> How do I write a simple lisp that allows me to make a single selection
> line, then have it sets the length of the line to a variable (setq x..
(setq
lineSel (entget (car (entsel "\nSelect Line\n")))
pt1 (cdr (assoc 10 ll))
pt2 (cdr (assoc 11 ll))
linlen (distance pt1 pt2)
)
HTH -Mark
codeIf you don't mind, could you give me the "bottom line" and post the entire
in thefor this lisp. I could find a lisp like this very useful but I got lost
post and could not put it together myself (i'm still learning lisp).
(setq ent (entget (car obj)))
of(while (not (setq obj (entsel "\nPick a line: "))))
(setq ent (entget (car obj)))
(if (= (cdr (assoc 0 ent)) "LINE")
(progn
(setq x (distance (cdr (assoc 10 ent))(cdr (assoc 11 ent)))) (alert (strcat "Length = " (rtos x))) ) ;; progn (alert "Object is not a LINE.") ) ;; if ___
"abevlad" wrote:
...
a
> line, then have it sets the length of the line to a variable (setq x..
Can you explain what is the purpose of this line and
and what exactly does it do.
;CAR returns the first element of a list
> (setq ent (entget (car obj)))