I'm a student doing a project to link another application software to
Autocad. The process is to convert the codes to Lisp format. However,
I'm face with a problem regarding using "Break" and "select" command in
lisp. I'm able to draw line, place components and write text using Lisp
However, when using "break" and "select" lisp, Autocad would not perform
this two command, even though these two command are found in the .lsp
file.
I'll appreciate if anyone would be able to help me with this problem, or
if there's any other methods to select a line or break a line using lisp
command. Thank you!
regards
russel
You don't actually have to select a line lispwise, to break it. The
command "break" does the selecting if you give it a point. However, there
are several ways to select an object, which I will not cover here.
The following is what I would use for a two-pick break:
(setq pnt1 (getpoint "\nSelect line at first break point: "))
(setq pnt2 (getpoint "\nSelect line at second break point: "))
(if (ssget pnt1 '((0 . "LINE,POLYLINE,LWPOLYLINE"))) ;is there something?
(command ".break" pnt1 pnt2)
(getstring "\nNo line selected. Press Return to continue. ")
) ;if
The following is what I would use for a three-pick break:
(setq pnt3 (getpoint "\nSelect line: "))
(setq pnt1 (getpoint "\nSelect first break point: "))
(setq pnt2 (getpoint "\nSelect second break point: "))
(if (ssget pnt3 '((0 . "LINE,POLYLINE,LWPOLYLINE"))) ;is there something?
(command ".break" pnt3 "f" pnt1 pnt2)
(getstring "\nNo line selected. Press Return to continue. ")
) ;if
Hope this is what you are looking for.
--
Dave D
(remove '-' for Email)
Russel <russ...@netscape.net> wrote in article
<38310EE3...@netscape.net>...