Jump to content

Create Batch file


gS7

Recommended Posts

Hi,

 

Is that Possible to create batch file , when double click the file

open autocad exe and run lisp file from specified directory ?

 

Please reply

Link to comment
Share on other sites

Yes i think this can be done.

You can have AutoCAD start up with a lisp program.

In combination with windows scripting.

 

 

But what is the real objective / the tasks that needs to be done, if i may ask?

Link to comment
Share on other sites

Hi halam Thank you for quick reply

I have created XXX.lsp , XXX.mnu, XXX.mnl and I want to load menu file directly when open AutoCad (for First time only)

so I asked for .Bat file codes

 

and I found a code but its giving error when I run the file

 

  start "t" /w "C:\Program Files\Autodesk\AutoCAD 2014\acad.exe" %%V /b  "D:\1.scr"

 

Error : cannot find the Specified Drawing file

please verify that the file exists

Link to comment
Share on other sites

Sorry, i can't help you tith a fully complete answer, i'm not an 'administrator' :)

Bu watch out for the notation of / or // or \ or \\ .. as little help in the direction.

 

 

 

 

 

 

https://forums.autodesk.com/t5/autocad-2007-2008-2009/how-can-i-write-a-script-to-add-a-path-to-the-support-file/td-p/2837855

 

 

quote

 

 



(vl-load-com)
(setq *files* (vla-get-Files (vla-get-Preferences (vlax-get-acad-object))))
(vla-put-SupportPath *files* (strcat (vla-get-SupportPath *files*) ";C:\\Lisps\\Steel"))
; etc..

Link to comment
Share on other sites

runcad.txt

or am I misunderstanding your question.

Yes Correct Bigal , I have created a .bat file using this code

"C:\Program Files\Autodesk\AutoCAD 2012\acad.exe" %%V /b "C:\AutoCADscripts\ScriptName.scr"

when I click the batch file AutoCAD Starts and and load the .scr file

but it is giving error

Error : cannot find the Specified Drawing file

please verify that the file exists

 

please help me

 

runcad.txt

 

Found this code in http://www.cadtutor.net/forum/showthread.php?82790-create-batch-file-to-run-script

Link to comment
Share on other sites

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...