KRBeckman Posted February 2, 2010 Posted February 2, 2010 Quick question... I'd like to purchase a book to help learn programing in Visual Lisp, so I don't have to ask a ton of questions in this forum (cause I do have a TON) Any suggestions? Quote
Freerefill Posted February 2, 2010 Posted February 2, 2010 Learn by doing, that's the best way. You don't need to purchase a book, there's a ton of free help to get you started. A good resource is AutoCAD itself: just mash "F1" when you're in the LISP editor to access the help files. Another good resource if you're just starting out is Jeff Sanders: http://www.jefferypsanders.com/autolisp.html It's fairly basic stuff, and it's explained nice and patiently, so it's a good place to start. For more in-depth stuff, check here: http://www.afralisp.net/ And, you can ask any question you want on the forum. The learning curve may be steep, but, as Lee pointed out to me several months ago, it's ultimately for the best. Quote
guitarguy1685 Posted February 3, 2010 Posted February 3, 2010 If you find a book let me know. I have not been able to find a decent book for Visual Lisp. Freerefill is right when he says learn by doing. I started just doing simple AutoLisps and then get more complex. I'm not an expert by any means but with the help of the very helpful people on this forum I've learend alot. Besides I'd like to see your questions because I'm sure I (and many others) have the same. The way I see it the more questions and questions answered the better these forums are. Quote
Lee Mac Posted February 3, 2010 Posted February 3, 2010 In my opinion, the best way to learn Visual LISP (and indeed how I learnt it), is using the Visual LISP Help files, and learning from examples posted on the forums. You'll be surprised at how easy you can pick it up. Admitted the Visual LISP help files are written for VBA - but they still provide the necessary arguments needed for functions, and in what order/format those arguments must be. Lee Quote
KRBeckman Posted February 3, 2010 Author Posted February 3, 2010 I'm trying this "learn by example" approach, and I'm getting some of the logic, but when I look at some of the ones that aren't the most basic, I get lost. I need a foundation to start with. Any ideas? Quote
Lee Mac Posted February 3, 2010 Posted February 3, 2010 Have a play around with these (defun c:dump (/ ent obj) (setq ent (entsel "\nSelect entity to get object data: ")) (print) (setq obj (vlax-ename->vla-object (car ent))) (vlax-dump-object obj t) (vlax-release-object obj) (textscr) (princ "\n") (princ)) (defun c:dumpapp (/ obj) (setq obj (vlax-get-acad-object)) (vlax-dump-object obj t) (vlax-release-object obj) (textscr) (princ)) (defun c:dumpdoc (/ obj) (setq obj (vla-get-ActiveDocument (vlax-get-acad-object))) (vlax-dump-object obj t) (vlax-release-object obj) (textscr) (princ)) (defun c:dumpn (/ ent obj) (setq ent (nentsel "\nSelect Sub entity to get object data: ")) (print) (setq obj (vlax-ename->vla-object (car ent))) (vlax-dump-object obj t) (vlax-release-object obj) (textscr) (princ "\n") (princ)) These will show you the properties and methods of different objects, the properties/methods are documented in the help. Quote
KRBeckman Posted February 4, 2010 Author Posted February 4, 2010 what do you mean it was wrong?? should i not go through these tutorials? Quote
Lee Mac Posted February 4, 2010 Posted February 4, 2010 what do you mean it was wrong?? should i not go through these tutorials? I believe he/she means that the information he/she posted was wrong, but didn't know that the 'delete post' button will delete the post. Quote
KRBeckman Posted February 4, 2010 Author Posted February 4, 2010 ok, good, cause i just spent an hour going throught the first 5-6. lol, woulda sucked to find out it didn't help me. Quote
Lee Mac Posted February 4, 2010 Posted February 4, 2010 ok, good, cause i just spent an hour going throught the first 5-6. lol, woulda sucked to find out it didn't help me. Tutorials are OK, but its just a lot of information to take in - but they are good for the basics. If I were you, I would try a practical example, something very simple in VL, like just changing the layer of an object, and see how you get on, - if you get stuck, we can help and you can learn from it Quote
devitg Posted February 5, 2010 Posted February 5, 2010 what do you mean it was wrong?? should i not go through these tutorials? KRBECKMAN , sorry I did it so. My way to see it was an error , was because I post a link to PLAIN LISP , and as you ask for VisualLISP , I thought you had PLAIN LISP SKILL. For me it was, and is, the best option to what I call "kindergarden LISP". I start in LISP , about 10 years ago , and begun VL maybe 5 years ago. I never read a whole BOOK , but I dig in all forum I can get on. Afralisp is a good start But the most usefull is the VLIDE HELP , and its tool APROPOS . If I see a VLxx function that I can not get help from vlide's help , I do a search ,google , for it , and sure I get a sample where I can see how it is apply. Please feel free to ask any need . One main tip is to state WHAT , you want to do , and HOW do you think it can be do. Most time the WHAT , can route to the HOW , and often the HOW give us not a clue about the WHAT. 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.