gS7 Posted January 9, 2017 Share Posted January 9, 2017 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 Quote Link to comment Share on other sites More sharing options...
halam Posted January 9, 2017 Share Posted January 9, 2017 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? Quote Link to comment Share on other sites More sharing options...
gS7 Posted January 9, 2017 Author Share Posted January 9, 2017 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 Quote Link to comment Share on other sites More sharing options...
halam Posted January 9, 2017 Share Posted January 9, 2017 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.. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 10, 2017 Share Posted January 10, 2017 You can load lisps on start up automatically using acaddoc.lsp so could check also for a menu if not loaded, or am I misunderstanding your question. Quote Link to comment Share on other sites More sharing options...
gS7 Posted January 10, 2017 Author Share Posted January 10, 2017 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 Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted January 10, 2017 Share Posted January 10, 2017 Try removing %%V. Quote Link to comment Share on other sites More sharing options...
gS7 Posted January 10, 2017 Author Share Posted January 10, 2017 roy_043 thank you it is working now ...and how to load a lisp file from known directory with .scr file Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted January 10, 2017 Share Posted January 10, 2017 (load "X:/MyPath/MyLisp.lsp") Quote Link to comment Share on other sites More sharing options...
gS7 Posted January 10, 2017 Author Share Posted January 10, 2017 thank you roy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.