Jump to content

Recommended Posts

Posted

I've used Autolisp to save data in a text file that was processed by a DOS based executable which output processed info into another text file. This worked well in R14 but now I'm using Acad 2007 and these files may end up ina document folder or elsewhere.

 

I've tried specifying where the should go or be found but this doesn't always work as expected.

 

This might work better in VBA or some using some vl-function (neither of which I've used yet). Any ideas?

Posted

I have no trouble wrighting to a text file. The program then calls a DOS hell to run the executable which outputs another text(result) file. Depending on how AutoCAD was started or how a file was open the program looks in the wrong place e.g. My Documents

 

I have even used the findfile function without much success.

Posted

Hmm, I'm a little lost. Without more information, I'm not sure how much I can help.

 

If all the DOS shell does is create a secondary file to run, you could easily do this with some LISP.

Posted
That's DOS shell :)

I think you had it right the first time. :wink:

 

Just kidding, I loved DOS when I was a kid.

Posted

The first text file is used as such:

Dosfile.exe

 

Firstfile.txt contains desired location and name for new file

e.g. C:\MyResults\Secondfile.txt

 

When the lisp program looks for the file it's not there.

My current thoughts: it's been put elsewhere or ACAD can't find Dosfile.exe

 

There must be an easier way

Posted

Post the code and we can dissect it.

Posted
I've used Autolisp to save data in a text file that was processed by a DOS based executable which output processed info into another text file. This worked well in R14 but now I'm using Acad 2007 and these files may end up ina document folder or elsewhere.

 

I've tried specifying where the should go or be found but this doesn't always work as expected.

 

This might work better in VBA or some using some vl-function (neither of which I've used yet). Any ideas?

You can type SHELL at the command line to get a dos prompt.

Posted

Thanks guys, in the end I put in the full path to the dot EXE file even though it is supposed to be in the ACAD search path. This seems to work.

 

A lot of this problem stems from the way Microsoft requires developers to place files for their applications. It was a lot easier prior to the 2005 release.

 

To all who replied, I appreciated your feedbacks.

AJ

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...