DOS and lisp

DOS and lisp

Anonymous
Not applicable
565 Views
8 Replies
Message 1 of 9

DOS and lisp

Anonymous
Not applicable
I have written a lisp program that, depending on user input runs various batch plots for .bat DOS files(using the extended batch plot utility). The problem is that the lisp program doesn't wait for the first batch plot to end and it tries to immeadiately run the next one (not a good thing). I put a loop delay in between each batch plot instance, which works, but due to the number of differnet speed computers I program for, you can imagine what a hassle this solution can be. In summary: is there a way I can have the lisp program wait for the DOS .bat file to finish before starting a new one. Thanks for any input.
0 Likes
566 Views
8 Replies
Replies (8)
Message 1 of 9

Anonymous
Not applicable
I have written a lisp program that, depending on user input runs various batch plots for .bat DOS files(using the extended batch plot utility). The problem is that the lisp program doesn't wait for the first batch plot to end and it tries to immeadiately run the next one (not a good thing). I put a loop delay in between each batch plot instance, which works, but due to the number of differnet speed computers I program for, you can imagine what a hassle this solution can be. In summary: is there a way I can have the lisp program wait for the DOS .bat file to finish before starting a new one. Thanks for any input.
0 Likes
Message 3 of 9

Anonymous
Not applicable
Why not have the LISP routine perform the plotting? That is what I have
done, this has gotten my plotting/printing routines completely away from
using script or batch files. I use the command -PLOT to use the plot
command via the command line.

--
Kevin Nehls
remove -ns- for direct reply
Kirk_P wrote in message ...
> I have written a lisp program that, depending on user input runs
various batch plots for .bat DOS files(using the extended batch plot
utility). The problem is that the lisp program doesn't wait for the first
batch plot to end and it tries to immeadiately run the next one (not a good
thing). I put a loop delay in between each batch plot instance, which
works, but due to the number of differnet speed computers I program for, you
can imagine what a hassle this solution can be. In summary: is there a way I
can have the lisp program wait for the DOS .bat file to finish before
starting a new one. Thanks for any input.
0 Likes
Message 4 of 9

Anonymous
Not applicable
A few questions about plotting using lisp:
1. When I plot out of lisp, when the plot is complete, the lisp program terminates and ignores any further commands. How do I prevent this from happening?
2. When I plot in lisp, how do I set the orientation and zoom to extents for each drawing.

Thanks again for any help.
0 Likes
Message 4 of 9

Anonymous
Not applicable
A few questions about plotting using lisp:
1. When I plot out of lisp, when the plot is complete, the lisp program terminates and ignores any further commands. How do I prevent this from happening?
2. When I plot in lisp, how do I set the orientation and zoom to extents for each drawing.

Thanks again for any help.
0 Likes
Message 6 of 9

Anonymous
Not applicable
What version of ACAD are you using? If 2000 are you running in MDI or SDI?
What are you trying to do right after the plotting, are you trying to open
another drawing and the LISP routine dies after that?

I am running my custom batch plotting stuff in SDI with LISPINIT set to 0 on
ACAD 2000 and have no problems with running pure LISP (no batch routines no
scripts....). I have my routine constantly "watching" a set of directories.
When it finds a drawing it opens it then depending on which directory it is
opened from I insert a logo and print the drawing. I also have the routine
doing a lot of other stuff, like looking at our standard border sizes and
deciding upon that stuff as to what size of paper to print the drawing on.

To set the orientation in my drawings I have used the EXTMIN and EXTMAX
variables to see if the drawing is "taller" than "long" or "longer" than
"tall". Then I set a variable to either "Landscape" or "Portrait" (I am
running 2000) and use that variable at the point where you would normally be
prompted for the orientation during the plot command.

For zooming extents, I simply do this before running the plotting stuff:

(command "zoom" "e")

Hope this helps 🙂

--
Kevin Nehls
remove -ns- for direct reply
Kirk_P wrote in message ...
>A few questions about plotting using lisp:
> 1. When I plot out of lisp, when the plot is complete, the lisp
program terminates and ignores any further commands. How do I prevent this
from happening?
> 2. When I plot in lisp, how do I set the orientation and zoom to
extents for each drawing.
>
>Thanks again for any help.
0 Likes
Message 7 of 9

Anonymous
Not applicable
For the record, I am running AutoCAD 14.01.

I messed around with the LISPINIT value and it didn't seem to make a differnce. When I run the following set of commands, the program stops cold as soon as I load the drawing, whether LISPINIT is set to 0 or 1.

(command "open" "c:\\runtime\\current\\1A.dwg")
(command "zoom" "e")

This was why I originally changed over to batch plotting. If there is a way to correct this, believe me, I'll never use the batch plot utility again.
0 Likes
Message 7 of 9

Anonymous
Not applicable
For the record, I am running AutoCAD 14.01.

I messed around with the LISPINIT value and it didn't seem to make a differnce. When I run the following set of commands, the program stops cold as soon as I load the drawing, whether LISPINIT is set to 0 or 1.

(command "open" "c:\\runtime\\current\\1A.dwg")
(command "zoom" "e")

This was why I originally changed over to batch plotting. If there is a way to correct this, believe me, I'll never use the batch plot utility again.
0 Likes
Message 9 of 9

Anonymous
Not applicable
Hi

Check DOS_COMMAND in DOS_lib from MCneels
0 Likes