skipsophrenic Posted January 6, 2009 Share Posted January 6, 2009 Hi all, I've been reading up on .LISP for a bit now and decided to take the plunge properly and learn it. I have followed the afralisp tutorial to draw a line to the LETTER, and AutoCAD is saying "; error: too many arguments" What am i doing wrong? (defun c:testline () ;Define Function (setq a (getpoint "\nEnter First Point : "")) ;Get the First point (setq b (getpoint "\nEnter Second Point : "")) ;Get the Second Point (command "Line" A b "") ;Draw the Line (princ) ;clean running ) ;end Defun (princ) ;clean Loading Quote Link to comment Share on other sites More sharing options...
skipsophrenic Posted January 6, 2009 Author Share Posted January 6, 2009 SORTED ........................................................................ Original Code with error's (defun c:testline () ;Define Function (setq a (getpoint "\nEnter First Point : [color=red]""[/color])) ;Get the First point (setq b (getpoint "\nEnter Second Point : [color=red]""[/color])) ;Get the Second Point (command "Line" A b "") ;Draw the Line (princ) ;clean running ) ;end Defun (princ) ;clean Loading code with error Fixed. (defun c:testline () ;Define Function (setq a (getpoint "\nEnter First Point : [color=red]"[/color])) ;Get the First point (setq b (getpoint "\nEnter Second Point : [color=red]"[/color])) ;Get the Second Point (command "Line" A b "") ;Draw the Line (princ) ;clean running ) ;end Defun (princ) ;clean Loading Quote Link to comment Share on other sites More sharing options...
paulmcz Posted January 6, 2009 Share Posted January 6, 2009 (defun c:testline () ;Define Function [color="Red"] (setq a (getpoint "\nEnter First Point : "))[/color] ;Get the First point [color="Red"] (setq b (getpoint "\nEnter Second Point : "))[/color] ;Get the Second Point (command "Line" A b "") ;Draw the Line (princ) ;clean running ) ;end Defun (princ) ;clean Loading An extra quot marks in red lines in your code Quote Link to comment Share on other sites More sharing options...
skipsophrenic Posted January 6, 2009 Author Share Posted January 6, 2009 cheers paul Quote Link to comment Share on other sites More sharing options...
flowerrobot Posted January 6, 2009 Share Posted January 6, 2009 From this error im assuming you are not using any program to play with them, i use notpad ++ to make them. its good to see where ive got closed brackets and will run any where. or "_vlide" Which is similar except colours are different, but allows to debug alot easyer, as it tells you where simple mistakes are, and easyer filtering where the bigger mistakes are. and reconises comands and variables but you need autocad open to make work. Quote Link to comment Share on other sites More sharing options...
skipsophrenic Posted January 6, 2009 Author Share Posted January 6, 2009 I've decided to try learn it when i get free time at work (Which at moment is alot) so as to keep me "looking busy" LOL, Quote Link to comment Share on other sites More sharing options...
flowerrobot Posted January 7, 2009 Share Posted January 7, 2009 yep i kno what you mean.ive being working on many myself, till more work comes in,except my boss thinks its a waste of time. hes a all tool bars man, who dosnt even do much work lol Quote Link to comment Share on other sites More sharing options...
JONTHEPOPE Posted January 7, 2009 Share Posted January 7, 2009 I never liked toolbars they take up to much screen space as for auto lisp have you looked at the The Visual LISP Developers Bible? pretty good stuff .a little hard to keep up for slow people like. me but it's worth it. everyone on here would agree i'm sure Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 7, 2009 Share Posted January 7, 2009 I've had a look at that JON before and yes, it is pretty helpful. Quote Link to comment Share on other sites More sharing options...
skipsophrenic Posted January 7, 2009 Author Share Posted January 7, 2009 The Visual LISP Developers Bible? Never even heard of that book m8 Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 7, 2009 Share Posted January 7, 2009 Never even heard of that book m8 See here: http://www.midpointcad.com/au/docs/lakose_The_Visual_LISP_Developers_Bible.pdf Quote Link to comment Share on other sites More sharing options...
skipsophrenic Posted January 7, 2009 Author Share Posted January 7, 2009 Thankyou Lee Mac That'll Comin Handy!!!!!!!! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 7, 2009 Share Posted January 7, 2009 It focusses a lot on visual LISP (which I am not so good at ), but there is a good section on how to use the vlide to debug. Quote Link to comment Share on other sites More sharing options...
skipsophrenic Posted January 7, 2009 Author Share Posted January 7, 2009 so do you direct type into notepad then lee? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 7, 2009 Share Posted January 7, 2009 so do you direct type into notepad then lee? No, I used to, but now I use Visual LISP Editor (provided with ACAD), just type "vlide" in the command prompt to access it. Quote Link to comment Share on other sites More sharing options...
skipsophrenic Posted January 7, 2009 Author Share Posted January 7, 2009 Cool thanks mate Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 7, 2009 Share Posted January 7, 2009 No probs Skip. 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.