Batch file to start AutoCAD.

Batch file to start AutoCAD.

dblouse
Explorer Explorer
3,909 Views
9 Replies
Message 1 of 10

Batch file to start AutoCAD.

dblouse
Explorer
Explorer

We have a DOS program that runs a batch file to start AutoCAD.

 

This worked fine with windows XP.

With Windows 7 Professional, when the DOS program runs the batch file, AutoCAD does not start.

It does work if I double click the batch file.

(We know the batch file is running, because we put an echo statement in the file, and it does echo the text to the dos window.)

 

I am logged in as an administrator, with full rights.

 

Any suggestions you could offer to fix this will be greatly appreciated.

 

0 Likes
3,910 Views
9 Replies
Replies (9)
Message 2 of 10

natasha.l
Alumni
Alumni

Hello @dblouse

 

Thank you for posting to the community. This is not the recommended way to launch AutoCAD, so I will let the community chime in on this one. 

 

 

0 Likes
Message 3 of 10

Tomislav.Golubovic
Advisor
Advisor

I have done this in the past, let me dig up the files and test today and send back a reply.

0 Likes
Message 4 of 10

dblouse
Explorer
Explorer
Thank you.


0 Likes
Message 5 of 10

Tomislav.Golubovic
Advisor
Advisor

If you need to start AutoCAD with a batch file, you can add arguments to the end of the it so that it forces a profile for example:

 

start acad.exe /p "C:\Program Files\Autodesk\AutoCAD 2019\Support\technexus\technexus.arg"

OR

 

start acad.exe /p technexus

 

 

This starts AutoCAD 2019 with my own profile every time I double click on the icon, plus as well I can set my own icon for the batch file.

 

There's a whole bunch of commands you can do with the DOS file before you start AutoCAD, it just depends on your own needs and requirements. If you go to the AutoCAD help and search for "Customize startup" you'll see the switches you can use.

 

0 Likes
Message 6 of 10

dblouse
Explorer
Explorer
Thank you for the reply.



The line that we have in the batch file works, if I double click on the batch file.

This is the line.



"C:\Program Files\Autodesk\AutoCAD 2019\acad.exe" /product ACAD /language "en-US" C:\Plotrout\Plt /b C:\Plotrout\Plotrtr.scr /p "D:\Prof2019\PCAD2_R2019.arg" /nologo



But if the DOS program we use runs the batch file, AutoCAD does not start.



I suspect it is a Windows security issue. But I am not sure.

(Windows 7 Professional)

The batch file is in the root folder "C:\".



Any help with this will be greatly appreciated.



Thanks.


0 Likes
Message 7 of 10

cadffm
Consultant
Consultant

 

>"The line that we have in the batch file works, if I double click on the batch file"
Ok, but just for my interest: I don't understand one part of this statement:

In front of => C:\Plotrout\Plt
is no parameter, so for what is that part of your start line? (and why there is no error, if there isn't an error , i didn't test it)
Can you explain me this part? thx.


>"But if the DOS program we use runs the batch file, AutoCAD does not start."

So the problem is the DOS program - where is it? whats the content?
Without the program we have to take a look from the crystal bone head,
thats no fun if we talk about YOUR problem and spend time for this.

Or because of the Rights like you guess! (I suspect it is a Windows security issue. But I am not sure.)

"
The batch file is in the root folder "C:\"."
Thats very very unusial for a professional computer user,
and Windows has the the same meaning!

Please try it with another place for your file!
Sure, in this case i am guessing, but i am not jokeing! Please try it from c:\YourOwnFolder\ or something like that.

 

Sebastian

0 Likes
Message 8 of 10

dblouse
Explorer
Explorer
Hello



Thank you for your reply.



"C:\Plotrout\Plt" is the drawing file that AutoCAD opens when it starts.


0 Likes
Message 9 of 10

cadffm
Consultant
Consultant

LoL, thank you, i was confused because of the missing file.EXTENSION(.dwg)

And did you try the place your stuff from c:\ to C:\yourownfolder\ ?

Sebastian

0 Likes
Message 10 of 10

dblouse
Explorer
Explorer
We haven't tried moving the batch file to a different folder yet.

(This is because the DOS program looks for the batch file in C:\.)



We are waiting on a programmer to revise the DOS program for us so that we can see if it runs from a different folder.

I will let you know if this works as soon as we can try it.



(If anyone is curious, the DOS program is written in Clipper.)



Thanks again. I do appreciate any suggestions anyone can offer.


0 Likes