TroutKing Posted April 27, 2009 Posted April 27, 2009 Hello I am trying to add a line or two to an existing .bat file so that it will run a preexisting lsp file. I am not having a lot of success. It doesn’t help that I am unfamiliar with both .bat and lsp files. I am simply trying to reverse engineer them and then add a couple lines. Currently the .bat file is used to switch profiles (new support paths and new lsp files in the Startup Suite). This portion works: net use s: \\Server1\Cadd\CompanyStandards\ClientSpecificStandards\Client1 net use t: \\Server1\Transfer net use u: \\Server1\Upload set acad_profile=Client1_std Now what I need is for the newly created profile (Client1_std) to include a lsp file placed in the Startup Suite and then ran. I have tried to add a line like this without success: if exist \\Server1\Cadd\CompanyStandards\ClientSpecificStandards\Client1\ClientStandards.lsp call \\Server1\Cadd\CompanyStandards\ClientSpecificStandards\Client1\ClientStandards.lsp or if exist S: ClientStandards.lsp call S: ClientStandards.lsp This is not working. Can someone help me? Thank you Mike Quote
CarlB Posted April 27, 2009 Posted April 27, 2009 I can't help you on that appproach.. but have you thought about starting AutoCAD with the switch to run a script on startup, and the script file can load and run a lisp routine. Quote
TroutKing Posted April 27, 2009 Author Posted April 27, 2009 Thanks for responding CarlB. I'm not sure where to set a switch to run a script on startup - but I think that would still leave me in the same predicament. I don't know the proper code for the script or .bat file to call up the lsp program? Quote
Freerefill Posted April 27, 2009 Posted April 27, 2009 I only know how to run a script at startup, using the /b switch, but that means you need to do it whilst you open AutoCAD. I'm not sure if there's a way to accomplish this whilst AutoCAD is running. Here's how I ran a script at startup from a .bat file: start /wait "C:\Program Files\AutoCAD Map 3D 2008\acad.exe" "path/file_name.dwg" /b "path/script_name.scr" To run a LSP via this method, your script needs to be nothing but a file with a .scr extention and containing: (c:your_lisp_command) Quote
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.