harilalmn Posted August 10, 2011 Share Posted August 10, 2011 (edited) Hi All, It has been a very short while since I put my hands on AutoLISP. Learning and moving forward, it has been becoming my craze to smoke my brain out on writing routines. As a result my sleep got cut down to 3-4 Hrs..!!! Well... To help myself out, today I compiled almost all functions (?) in Autolisp and made a notepad database. Then I wrote a small vb script to search functions and their descriptions in this database. I thought of sharing it here with you guys.... May be very much amateur... Still I hope it would help someone... I have attached the two files; the vbscript and the database in txt format; as a zip file. For the program to work, you should have both the files saved in same location. You can either search a function by entering the description, or vice versa... Autolisp_Functions_Search.zip Edited August 10, 2011 by harilalmn Quote Link to comment Share on other sites More sharing options...
irneb Posted August 10, 2011 Share Posted August 10, 2011 That was probably a lot of copy-n-pasting! It would be nice to use such directly in VLIDE. At present you can type Ctrl+F1 while the cursor is on the function name and then the help page would open. Searching through the description is still a hassle as ADesk's "on-line" help search is still a mess: I prefer just doing a google instead - usually gets a lot better results. It would be nice to have yours link to the help as well. Or have some option to place the function name in clipboard so you can paste into VLIDE. The dialog doesn't allow you to select text to copy. BTW, here's the same thing as your VBS but in Lisp: (vl-load-com) (defun c:SearchAutolispFunction (/ fn f str lst) (if (and (setq fn (findfile "Autolisp_Functions.txt")) (setq f (open fn "r")) ) (progn (while (setq str (read-line f)) (setq lst (cons str lst)) ) (close f) (if lst (if (setq str (getstring "Search string: ")) (alert (apply 'strcat (cons "Found functions:\n" (mapcar '(lambda (item) (strcat "\n" item) ) (acad_strlsort (vl-remove-if-not '(lambda (item) (wcmatch (strcase item) (strcat "*" (strcase str) "*")) ) lst ) ) ) ) ) ) (alert "Can't search for nothing.") ) (alert "Nothing in function database.") ) ) (alert "No function database file found.") ) (princ) ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 10, 2011 Share Posted August 10, 2011 harilalmn, I applaud your efforts to compile such a reference, however, the VLIDE does have all this information directly available, including (for versions Maybe have a look at these short tutorials on the Visual LISP IDE (VLIDE), if you aren't already familiar with it. Quote Link to comment Share on other sites More sharing options...
alanjt Posted August 10, 2011 Share Posted August 10, 2011 harilalmn, I applaud your efforts to compile such a reference, however, the VLIDE does have all this information directly available, including (for versions Maybe have a look at these short tutorials on the Visual LISP IDE (VLIDE), if you aren't already familiar with it. ................. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 10, 2011 Share Posted August 10, 2011 [ATTACH]29285[/ATTACH]................. Just trying to save the guy/gal from re-inventing the wheel! Quote Link to comment Share on other sites More sharing options...
alanjt Posted August 10, 2011 Share Posted August 10, 2011 Just trying to save the guy/gal from re-inventing the wheel! I wasn't fussing at you. I would have said the same thing if I'd gotten to him first. Quote Link to comment Share on other sites More sharing options...
harilalmn Posted August 10, 2011 Author Share Posted August 10, 2011 Lol... Thanks for the comments, Seniors...!!! I believe, "If it eats up too much of time doing something, there is always a better way to do it." So, now here, I got to know something new. And........ Lee...., I had never been to lee-mac.com. Thanks a lot for the link. That is really a treasure out there for beginners like me...!! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 10, 2011 Share Posted August 10, 2011 And........ Lee...., I had never been to lee-mac.com. Thanks a lot for the link. That is really a treasure out there for beginners like me...!! Cheers harilalmn If you have any questions about any of my tutorials, please do ask Quote Link to comment Share on other sites More sharing options...
harilalmn Posted August 10, 2011 Author Share Posted August 10, 2011 Sure... and Thankyou Lee..... 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.