Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AutoCAD shell command in R14

0 views
Skip to first unread message

NSSethi

unread,
Jan 21, 1999, 3:00:00 AM1/21/99
to
Hi!
I have written some Autolisp code for Acad R12, which utilized the files
command to copy, delete & rename files as part of the lisp code.
Since the files command has been discontinued in R14, I tried using the
shell (rename & copy) command, but the program does not run successfully
as it did in R12). I have found the error to be that the lisp program keeps
running without waiting for the shell commands that are running in the
background to complete, thus data that is required by the lisp file from a
renamed file etc are not available to autolisp & the program stops execution
with an error message like file not found etc.
Is there a variable etc that forces the completion of the shell command etc
before the next step in AutoLisp is executed.
Any help will be appreciated.
Thanks
Nat

Heinz Navratil

unread,
Jan 21, 1999, 3:00:00 AM1/21/99
to
Hi,
i do not know any variable, but maybe the functions from the DOSLIB14.ARX
will help you. There are a lot of functions to manibulate files.
You can find them in your BONUS\CADTOOLS directory, see the DOSLIB14.DOC
for more information

ciao
Heinz

NSSethi schrieb in Nachricht <787o9l$1b...@adesknews2.autodesk.com>...

Greg Toews

unread,
Jan 21, 1999, 3:00:00 AM1/21/99
to
I would also recommend using the DOSLIB functions. If you don't want to use
DOSLIB then edit your acad.pgp file and change the parameter for the shell
from 1 to 0.

Change this:
SHELL, , 1,*OS Command: ,
to this:
SHELL, , 0,*OS Command: ,
or make a new one just for your program
LISPSHELL, , 0,*OS Command: ,

Or, if you have the alias editor in your bonus menu then just run it, make a
small change somewhere, reverse the change and then click the apply button.
It will do a lovely job of making this modification for you without asking
:).

Greg


NSSethi wrote in message <787o9l$1b...@adesknews2.autodesk.com>...

Mark McDonough

unread,
Jan 21, 1999, 3:00:00 AM1/21/99
to
As others have suggested, DOSLIB14.ARX is the way to go, giving terrific DOS
like capabilities directly within AutoCAD. It looks nicer too... without a
DOS shell window popping up. However, I wanted to recognize the problem
you're having... the processing order of DOS commands or external type
functions does not always go in the right sequence as you suggest, and the
lisp keeps going ahead without waiting for the DOS command to function.

However, even with DOSLIB14, there are occasionally similar instances where
the DOSLIB function call is not finished and other lisp code farther down
the pike gets processed before the DOSLIB14 function is done. I can't
remember the details of this problem off hand... I could if I poked around
my recent lisp routines where I discovered the problem. My solution was to
defun a separate subfunction with just the DOSLIB14 function in it, then
back in the main list routine, called the subfunction rather than executing
the DOSLIB14 directly, and it took care of the problem.

Mark McDonough
mmcdo...@sasaki.com
http://www.sasaki.com

0 new messages