OMEGA-ThundeR Posted November 4, 2014 Share Posted November 4, 2014 Hello, i'm trying to create an lisp so that on new installations of AutoCAD all the settings, variables and filelocations are set and loaded in one step. i'm trying to reverse engineer my current profile (.arg file) but i guess there is no 'setenv' for the lisp that are set in the startup suite. [HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R19.1\ACAD-D001:409\Profiles\OMEGA-ThundeR\Dialogs\Appload\Startup] "NumStartup"="2" "1Startup"="C:\\folder\\Lisp\\Lisp 1.lsp" "2Startup"="C:\\folder\\Lisp\\Lisp 2.lsp" Above the part that lists the lisp that are in my current Startup suite. TLDR; Is there a (simple) way to set lisp routines in the Startup Suite via lisp? Something like: (setenv "StartupSuite" "C:\\folder\\Lisp\\Lisp 1.lsp") But any code that works is fine by me . Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 4, 2014 Share Posted November 4, 2014 TLDR; Is there a (simple) way to set lisp routines in the Startup Suite via lisp? Avoid the Startup Suite altogether - use the acaddoc.lsp instead (see Method 2 of my tutorial here). Note: if the acaddoc.lsp file does not exist in your AutoCAD Support Path, you can create this file as you would any other AutoLISP file. Do not modify the acad20##.lsp or acad20##doc.lsp, as these are reserved for use by AutoCAD. To check whether an acaddoc.lsp file already exists, open AutoCAD to a new drawing and type at the command-line: (findfile "acaddoc.lsp") If the above returns nil, AutoCAD cannot find any files with the filename acaddoc.lsp in any Support File Search Paths or the working directory. Quote Link to comment Share on other sites More sharing options...
OMEGA-ThundeR Posted November 4, 2014 Author Share Posted November 4, 2014 I found that page too. But i want to make it user friendly. Open Autocad, load one lisp and that lisp does all the work for them. Besides, that would also mean i have to make ACADDOC.lsp lisp that contains all the AUTOLOAD commands. Its to much work for the amount of lisp routines i made We don't use much lisp routine (its one file with dozens of handy commands), and there are no heavy programs in the standard loaded lisp routines that would cause any problems. So i just want to know how i can get an lisp routine in the startup suite via a command or variable that can be loaded via an lisp. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 4, 2014 Share Posted November 4, 2014 I found that page too. But i want to make it user friendly. Open Autocad, load one lisp and that lisp does all the work for them. There is no difference in the user-friendliness of your requested solution to that which I am suggesting - you are requesting that the user run a program to configure the Startup Suite, whereas my solution simply involves running a program to configure the support paths & trusted paths so that AutoCAD can find the acaddoc.lsp. Besides, that would also mean i have to make ACADDOC.lsp lisp that contains all the AUTOLOAD commands. Its to much work for the amount of lisp routines i made No you don't, you can use the AutoLISP load function as described on that page. We don't use much lisp routine (its one file with dozens of handy commands), and there are no heavy programs in the standard loaded lisp routines that would cause any problems. Even easier, you can use a single load expression to load this one file. So i just want to know how i can get an lisp routine in the startup suite via a command or variable that can be loaded via an lisp. The Startup Suite cannot be automated via LISP. Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted November 4, 2014 Share Posted November 4, 2014 This was the recent thread in this forum. http://www.cadtutor.net/forum/showthread.php?89405-Sharing!-AutoStartup I don't use startup bcos Normally I use Vlide to organize or compiled VLX Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 4, 2014 Share Posted November 4, 2014 If you are concerned with the time it may take to write the necessary load/autoload expressions, you could even use my ACADDOC.lsp Creator or Autoloader programs to generate these expressions for you. Quote Link to comment Share on other sites More sharing options...
OMEGA-ThundeR Posted November 4, 2014 Author Share Posted November 4, 2014 It's probably something the same as 'hanhphuc', but i made an registery file to add the lisp to the Startup Suite File.reg (for Autocad 2015) Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R20.0\ACAD-E001:409\Profiles\<<Unnamed Profile>>\Dialogs\Appload\Startup] "1Startup"="C:\\Folder\\Lisp\\Lisp.lsp" "NumStartup"="1" And added the Trusted Path via the installation lisp. Install.lsp (command "TRUSTEDPATHS" "C:\\Folder\\Lisp") (setq program "C:\\Windows\\regedit.exe" filename "\42C:\\folder\\File.reg\42") (startapp program filename) (princ) Works like a charm (for me). i'm no advanced user of lisp so i try to keep it basic. 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.