vernonlee Posted March 22, 2015 Share Posted March 22, 2015 How do you guys manage your LISP within AutoCAD? Currently this is what i do:- 1)APP command to auto load some of my frequently used LISP. a) key in commands - for everyday LISP b) shortcut icon buttons - for occasional but necessary LISP I have to create a shortcut (as i cannot remember so many) with a script to activate them 2)Dragging the LISP from windows explorer into autocad This are used only during specific task 3)AutoCAD Tool Palettes I also experimented with this & Pros - I can name as a full description of what the LISP does Cons - having it opened all the time, takes up a good chunk of working space - having it closed all the time, I need to press CTRL+3 everytime i need to access the LISP Anyway, the main thing is 1b). The type of LISP are getting more & more & getting harder to even remember what the shortcut icon means, even though a description will popup but it take time to look for the one i need. So wanted suggestions for how to efficiently manage the LISP within AutoCAD for quick access. Any suggestions? Thanks Quote Link to comment Share on other sites More sharing options...
dbroada Posted March 22, 2015 Share Posted March 22, 2015 I didn't use that many but I had them stored in a pathed folder. Then the few I needed would be called and loaded from the command line. (load "myLisp") myLisp I then had a few on the desktop (two monitors) that could be dragged in to the current window. And finally a couple were on the tool palette that is set to "Autohide". This only becomes visible when you put you rusor over it so only takes up a very small portion of screen. The palette could also be placed on the second screen but I used it often so didn't want to look off the main screen. Quote Link to comment Share on other sites More sharing options...
Organic Posted March 22, 2015 Share Posted March 22, 2015 I have a folder of lisps on my desktop (many of which are Lee Macs). All lisps are automatically loaded in the startup suite for when AutoCad launches. Then I have a couple of custom toolbars that contain the most common lisp commands I use on a daily/weekly basis. Quote Link to comment Share on other sites More sharing options...
David Bethel Posted March 22, 2015 Share Posted March 22, 2015 For things I can't remember, 1 of the things that helps me the most is that over the years I have very been consistent in having the 3rd line in every lsp file contain a comment / description of the program. ;======================================================================= ; BLK-FIXG.Lsp Mar 10, 2014 ; Search BLOCK Table By DXF Pairs And Then Update those BLOCKs By Group Then I made a search routine based on either a wildcard pattern for the .lsp name or simply search all .lsp for a terms or phrases. As to loading, 1 of style of shortcut : acad.lsp (acaddoc.lsp) ;;;MILLWORK (defun c:mcb ()(if (not mcb_)(load "MILL-CB"))(mcb_)) (defun c:mct ()(if (not mct_)(load "MILL-CT"))(mct_)) (defun c:mws ()(if (not mws_)(load "MILL-STR"))(mws_)) (defun c:mi ()(if (not mi_)(load "MILL-ISL"))(mi_)) HTH -David Quote Link to comment Share on other sites More sharing options...
vernonlee Posted March 22, 2015 Author Share Posted March 22, 2015 I have a folder of lisps on my desktop (many of which are Lee Macs). All lisps are automatically loaded in the startup suite for when AutoCad launches. Then I have a couple of custom toolbars that contain the most common lisp commands I use on a daily/weekly basis. meaning you create new commands [using scripts commands eg, c^c^(load.......)test;] with icons? Quote Link to comment Share on other sites More sharing options...
vernonlee Posted March 22, 2015 Author Share Posted March 22, 2015 Then I made a search routine based on either a wildcard pattern for the .lsp name or simply search all .lsp for a terms or phrases Could you elobrate on this? Thanks Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 23, 2015 Share Posted March 23, 2015 Casacading menu's is another simple way. These can be sub sub etc. Quote Link to comment Share on other sites More sharing options...
Organic Posted March 23, 2015 Share Posted March 23, 2015 meaning you create new commands [using scripts commands eg, c^c^(load.......)test;] with icons? Exactly I am so used to doing it now I forgot about this step. Quote Link to comment Share on other sites More sharing options...
David Bethel Posted March 23, 2015 Share Posted March 23, 2015 Could you elobrate on this? Thanks Something like this : [color=#8b4513];=======================================================================[/color] [color=#8b4513]; SL.LSP May 9, 2014[/color] [color=#8b4513]; SEARCH FOR LISP FILE NAME BASED ON FILE NAME & DESCRIPTION SEARCH[/color] [color=#8b4513];================== Stand Alone Program ================================[/color] [b][color=BLACK]([/color][/b]defun c:sl [b][color=FUCHSIA]([/color][/b]/ path st dir ss ll sw1 sw2 sw3 l3 rf dl i[b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]setq path [color=#2f4f4f]"/acad/ut/"[/color][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]initget 1 [color=#2f4f4f]"* Prefix Wildcard"[/color][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]setq st [b][color=NAVY]([/color][/b]getkword [color=#2f4f4f]"\nFile Sesrch Criteria - Prefix/Wildcard/* : "[/color][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]cond [b][color=NAVY]([/color][/b][b][color=MAROON]([/color][/b]= st [color=#2f4f4f]"*"[/color][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]setq ss [color=#2f4f4f]"*"[/color][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]setq dir [b][color=GREEN]([/color][/b]mapcar 'strcase [b][color=BLUE]([/color][/b]dos_dir [b][color=RED]([/color][/b]strcat path [color=#2f4f4f]"*.lsp"[/color][b][color=RED])[/color][/b][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b][b][color=MAROON]([/color][/b]= st [color=#2f4f4f]"Prefix"[/color][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]while [b][color=GREEN]([/color][/b]not [b][color=BLUE]([/color][/b]snvalid ss[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]setq ss [b][color=BLUE]([/color][/b]strcase [b][color=RED]([/color][/b]getstring [color=#2f4f4f]"\nLSP File Prefix: "[/color][b][color=RED])[/color][/b][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]setq dir [b][color=GREEN]([/color][/b]mapcar 'strcase [b][color=BLUE]([/color][/b]dos_dir [b][color=RED]([/color][/b]strcat path ss [color=#2f4f4f]"*.lsp"[/color][b][color=RED])[/color][/b][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b][b][color=MAROON]([/color][/b]= st [color=#2f4f4f]"Wildcard"[/color][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]setq ss [b][color=GREEN]([/color][/b]strcase [b][color=BLUE]([/color][/b]getstring [color=#2f4f4f]"\nWildcard Pattern: "[/color][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]setq dir [b][color=GREEN]([/color][/b]mapcar 'strcase [b][color=BLUE]([/color][/b]dos_dir [b][color=RED]([/color][/b]strcat path [color=#2f4f4f]"*.lsp"[/color][b][color=RED])[/color][/b][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]foreach l dir [b][color=GREEN]([/color][/b]if [b][color=BLUE]([/color][/b]wcmatch [b][color=RED]([/color][/b]substr l 1 [b][color=PURPLE]([/color][/b]- [b][color=TEAL]([/color][/b]strlen l[b][color=TEAL])[/color][/b] 4[b][color=PURPLE])[/color][/b][b][color=RED])[/color][/b] ss[b][color=BLUE])[/color][/b] [b][color=BLUE]([/color][/b]setq ll [b][color=RED]([/color][/b]cons l ll[b][color=RED])[/color][/b][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]setq dir ll[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]if dir [b][color=NAVY]([/color][/b]progn [b][color=MAROON]([/color][/b]setq sw1 [b][color=GREEN]([/color][/b]getstring t [color=#2f4f4f]"\nSearch Phrase 1: "[/color][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]if [b][color=GREEN]([/color][/b]= sw1 [color=#2f4f4f]""[/color][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]setq sw1 [color=#2f4f4f]"*"[/color] sw2 [color=#2f4f4f]""[/color] sw3 [color=#2f4f4f]""[/color][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]progn [b][color=BLUE]([/color][/b]setq sw2 [b][color=RED]([/color][/b]getstring t [color=#2f4f4f]"\nSearch Phrase 2: "[/color][b][color=RED])[/color][/b][b][color=BLUE])[/color][/b] [b][color=BLUE]([/color][/b]if [b][color=RED]([/color][/b]= sw2 [color=#2f4f4f]""[/color][b][color=RED])[/color][/b] [b][color=RED]([/color][/b]setq sw3 [color=#2f4f4f]""[/color][b][color=RED])[/color][/b] [b][color=RED]([/color][/b]progn [b][color=PURPLE]([/color][/b]setq sw3 [b][color=TEAL]([/color][/b]getstring t [color=#2f4f4f]"\nSearch Phrase 3: "[/color][b][color=TEAL])[/color][/b][b][color=PURPLE])[/color][/b][b][color=RED])[/color][/b][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]princ [color=#2f4f4f]"\nSearching...\n"[/color][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]setq dir [b][color=GREEN]([/color][/b]acad_strlsort dir[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]foreach f dir [b][color=GREEN]([/color][/b]princ [b][color=BLUE]([/color][/b]strcat[color=#2f4f4f]" \r"[/color] [b][color=RED]([/color][/b]substr f 1 [b][color=PURPLE]([/color][/b]- [b][color=TEAL]([/color][/b]strlen f[b][color=TEAL])[/color][/b] 4[b][color=PURPLE])[/color][/b][b][color=RED])[/color][/b][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]setq rf [b][color=BLUE]([/color][/b]open [b][color=RED]([/color][/b]strcat path f[b][color=RED])[/color][/b] [color=#2f4f4f]"r"[/color][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]repeat 3 [b][color=BLUE]([/color][/b]setq l3 [b][color=RED]([/color][/b]read-line rf[b][color=RED])[/color][/b][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]close rf[b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]and l3 [b][color=BLUE]([/color][/b]= [color=#2f4f4f]";"[/color] [b][color=RED]([/color][/b]substr l3 1 1[b][color=RED])[/color][/b][b][color=BLUE])[/color][/b] [b][color=BLUE]([/color][/b]> [b][color=RED]([/color][/b]strlen l3[b][color=RED])[/color][/b] 3[b][color=BLUE])[/color][/b] [b][color=BLUE]([/color][/b]foreach s [b][color=RED]([/color][/b]list sw1 sw2 sw3[b][color=RED])[/color][/b] [b][color=RED]([/color][/b]and [b][color=PURPLE]([/color][/b]/= s [color=#2f4f4f]""[/color][b][color=PURPLE])[/color][/b] [b][color=PURPLE]([/color][/b]wcmatch [b][color=TEAL]([/color][/b]strcase l3[b][color=TEAL])[/color][/b] [b][color=TEAL]([/color][/b]strcat [color=#2f4f4f]"*"[/color] [b][color=OLIVE]([/color][/b]strcase s[b][color=OLIVE])[/color][/b] [color=#2f4f4f]"*"[/color][b][color=TEAL])[/color][/b][b][color=PURPLE])[/color][/b] [b][color=PURPLE]([/color][/b]setq dl [b][color=TEAL]([/color][/b]cons [b][color=OLIVE]([/color][/b]strcat [b][color=GRAY]([/color][/b]substr f 1 [b][color=AQUA]([/color][/b]- [b][color=LIME]([/color][/b]strlen f[b][color=LIME])[/color][/b] 4[b][color=AQUA])[/color][/b][b][color=GRAY])[/color][/b] [color=#2f4f4f]":"[/color] [b][color=GRAY]([/color][/b]substr l3 3[b][color=GRAY])[/color][/b][b][color=OLIVE])[/color][/b] dl[b][color=TEAL])[/color][/b][b][color=PURPLE])[/color][/b][b][color=RED])[/color][/b][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]textpage[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]princ [color=#2f4f4f]"LSP Files Found :"[/color][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]setq i 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]foreach f [b][color=GREEN]([/color][/b]reverse dl[b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]princ [b][color=BLUE]([/color][/b]strcat [color=#2f4f4f]"\n"[/color] f[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]cond [b][color=BLUE]([/color][/b][b][color=RED]([/color][/b]<= i 15[b][color=RED])[/color][/b][b][color=BLUE])[/color][/b] [b][color=BLUE]([/color][/b]T [b][color=RED]([/color][/b]getstring [color=#2f4f4f]"\n\nPress Enter To Continue...\n"[/color][b][color=RED])[/color][/b] [b][color=RED]([/color][/b]setq i 0[b][color=RED])[/color][/b][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]setq i [b][color=BLUE]([/color][/b]1+ i[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]alert [color=#2f4f4f]"No LSP Files Found That Match the Search Parameter"[/color][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]prin1[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] You would need to edit the (setq path " " ) statement to match your setup -David Quote Link to comment Share on other sites More sharing options...
SLW210 Posted March 23, 2015 Share Posted March 23, 2015 I never use the startup suite. I load frequently used stuff with ACADDOC.LSP from my pathed LISP folder, that's not very many these days. The rest I usually drag and drop. Like dbroada, my palettes are also Autohide as small buttons on the right, along with Properties, XREF Manager, Design Center and Calculator. Also, like dbroada, I will type the code on the commandline. P.S. Previously I did like BIGAL, menus, that's an excellent way if you have a lot you use frequently. Quote Link to comment Share on other sites More sharing options...
vernonlee Posted March 24, 2015 Author Share Posted March 24, 2015 Hi BIGAL. Looks interesting. What kind & how do you create this menu? Casacading menu's is another simple way. These can be sub sub etc. ] Quote Link to comment Share on other sites More sharing options...
vernonlee Posted March 24, 2015 Author Share Posted March 24, 2015 Hi David. Thanks for the LISP So it will search through the description in all the LISP in that folder Is the (setq path " " ) where i keep my LISP collection? Meaning: example (setq path "c:\autocad\LISP" ) Something like this : You would need to edit the (setq path " " ) statement to match your setup -David Quote Link to comment Share on other sites More sharing options...
vernonlee Posted March 24, 2015 Author Share Posted March 24, 2015 Hi SLW210, I have never played with ACADDOC.LSP before. Perhaps you can enlighten me. Is ACADDOC.LSP basically a collection of the text of individual LISP? Then if you need to edit something there would be a wall of text to scroll through. How do we manage this I am curious? I never use the startup suite. I load frequently used stuff with ACADDOC.LSP from my pathed LISP folder Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 24, 2015 Share Posted March 24, 2015 Setting Support paths is easily done CONFIG, Files, the first option is to set support paths so just add where you have put all your lisp's etc. Re menu, simplest way is write in notepad your menu here is an example. The -> means open sub menu ***MENUGROUP=VERNONLEE ***POP15 **CADLIB [->LISP1 A-B] [Add 2 Level]^C^C(LOAD "add-to-levels") [Add-pits-drain]^C^C(LOAD "Add-pits-drain") [<-] [->LISP2 C-D] [->CARPARKS] [No carparks]^C^C(load "how many carparks") carpark [Carpark 0]^C^C(load "simple carpark") npark90 [<-] [Drawxfall]^C^C(LOAD "Drawxfall") [Driveway]^c^c(load "coggdrive") DRV [<-Dynam Rad]^C^C(LOAD "Continuousfillet1.2") CF [<-] Quote Link to comment Share on other sites More sharing options...
SLW210 Posted March 24, 2015 Share Posted March 24, 2015 Hi SLW210, I have never played with ACADDOC.LSP before. Perhaps you can enlighten me. Is ACADDOC.LSP basically a collection of the text of individual LISP? Then if you need to edit something there would be a wall of text to scroll through. How do we manage this I am curious? Search around here on CADTutor, plenty of info on that method. I also use it to set my variables. There was an old thread on CADTutor or two with people posting what they had in their ACADDOC.LSP. http://www.cadtutor.net/forum/showthread.php?30271-acaddoc.lsp-how-do-you-do-it http://www.cadtutor.net/forum/showthread.php?77992-rules-for-acaddoc.lsp From Lee Mac's great site.....http://www.lee-mac.com/autoloading.html and http://www.lee-mac.com/acaddoccreator.html From JTB World.....http://jtbworld.com/lisp/acaddoc.htm A thread on ACAD.LSP vs ACADDOC.LSP 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.