KennethYeoh Posted April 18, 2011 Share Posted April 18, 2011 I was just following the tutorial and i realised that i could not load the testline lisp. AutoCad states [; error:too many arguments ]? I have tried everythin i could think of to no avail. It would be very helpful if someone could shine some light on this issue. Regards Kenneth Quote Link to comment Share on other sites More sharing options...
alanjt Posted April 18, 2011 Share Posted April 18, 2011 What tutorial? Quote Link to comment Share on other sites More sharing options...
Ohnoto Posted April 18, 2011 Share Posted April 18, 2011 Can you post your code, make sure you use code tags. Quote Link to comment Share on other sites More sharing options...
ReMark Posted April 18, 2011 Share Posted April 18, 2011 He is referring to this: http://www.afralisp.net/autolisp/tutorials/the-basics-part-2.php Quote Link to comment Share on other sites More sharing options...
SLW210 Posted April 18, 2011 Share Posted April 18, 2011 Did you follow all of the instructions? What did you type to load it? Quote Link to comment Share on other sites More sharing options...
KennethYeoh Posted April 19, 2011 Author Share Posted April 19, 2011 (defun c:testline() (setq a (getpoint "\nEnter first point :" )) (setq b (getpoint "\nEnter second point :" )) (command "Line" a b "") (princ) ) (princ) I think i followed all the instructions to the letter I used (load "testline") then testline to launch. i'm sure its somethin really simple and obvious???? Gladly consider all feedback! thanks! Quote Link to comment Share on other sites More sharing options...
MSasu Posted April 19, 2011 Share Posted April 19, 2011 Your code is working! So there is an issue with load/call process. Where is the "testline.lsp" file located? If is not in one of AutoCAD's search paths you should append the path to load call - please take care that need to use double back-slash. Substitute your current path in example below: (load "D:\\MyTestAutoLISP\\testline.lsp") To call it just input testline at command prompt since is defined as a command. Good luck! Regards, Mircea Quote Link to comment Share on other sites More sharing options...
KennethYeoh Posted April 19, 2011 Author Share Posted April 19, 2011 Your code is working! So there is an issue with load/call process.Where is the "testline.lsp" file located? If is not in one of AutoCAD's search paths you should append the path to load call - please take care that need to use double back-slash. Substitute your current path in example below: (load "D:\\MyTestAutoLISP\\testline.lsp") To call it just input testline at command prompt since is defined as a command. Good luck! Regards, Mircea There's still an error? Says LOAD failed =( I saved the lisp file on the desktop. Quote Link to comment Share on other sites More sharing options...
KennethYeoh Posted April 19, 2011 Author Share Posted April 19, 2011 Scratch that, i have suceeded in loading the file, but when i call the program using testline it states that there is stil an error and that there are too many arguments? Quote Link to comment Share on other sites More sharing options...
KennethYeoh Posted April 19, 2011 Author Share Posted April 19, 2011 I have succeeded. Created a new file from scratch and it works just fine thanks for all your help! Quote Link to comment Share on other sites More sharing options...
MSasu Posted April 19, 2011 Share Posted April 19, 2011 Sound good that you finally solved your loading issue. Did you stored in the same file some previous code tests? Regards, Mircea 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.