skipsophrenic Posted January 8, 2009 Posted January 8, 2009 Hi all, I'v written my first program without following a step by step idiot guide and guess what? i think it's a lemon! I've posted the code below - what's happening is I go to load it, and AutoCAD says "Command: ; error: malformed list on input" where am I going wrong here pls? ;Routine to reset -Scalelistedit in 1 command ;Written by P. Smith (Defun c:SCLLSTRST () ;Define Function Name (command "-scalelistedit" "";Invokes Scalelistedit command ("R" ;Reset Scale list ("Y" ; Yes ("E" ;Exit -Scalelist command ) ) ) ) (princ) Quote
feargt Posted January 8, 2009 Posted January 8, 2009 ;Routine to reset -Scalelistedit in 1 command ;Written by P. Smith (Defun c:SCLLSTRST () ;Define Function Name (command "-scalelistedit" "r" "y" "e");Invokes Scalelistedit command (princ) ) Quote
feargt Posted January 8, 2009 Posted January 8, 2009 ;Routine to reset -Scalelistedit in 1 command ;Written by P. Smith (Defun c:SCLLSTRST () ;Define Function Name (command "-scalelistedit" "";Invokes Scalelistedit command ("R" ;Reset Scale list ("Y" ; Yes ("E" ;Exit -Scalelist command ) ) ) ) (princ) The red quote marks seem to be your problem.....no need for them here, and also the last closing parentheses was missing after (princ) Quote
skipsophrenic Posted January 8, 2009 Author Posted January 8, 2009 Thanks for that m8. I thought you needed to put them on separate lines. me = brainmelt Quote
skipsophrenic Posted January 8, 2009 Author Posted January 8, 2009 Extra quotes AGAIN!! one day i'll get the hang of this . . . . I hope Ok, fixed above two mentioned issues but now am getting this message Command: scllstrst -scalelistedit Enter option [?/Add/Delete/Reset/Exit] : ; error: bad function: "E" Enter option [?/Add/Delete/Reset/Exit] : Quote
feargt Posted January 8, 2009 Posted January 8, 2009 ;Routine to reset -Scalelistedit in 1 command;Written by P. Smith (Defun c:SCLLSTRST () ;Define Function Name (command "-scalelistedit" "r" "y" "e");Invokes Scalelistedit command (princ) ) this worked for me without a problem using the above Quote
skipsophrenic Posted January 8, 2009 Author Posted January 8, 2009 Thanks Feargt, do you want me to include you in the "written by" section of the code? Quote
feargt Posted January 8, 2009 Posted January 8, 2009 certainly not........I was only helping you out Quote
skipsophrenic Posted January 8, 2009 Author Posted January 8, 2009 certainly not........I was only helping you out LOL, ok an thnks again Quote
Lee Mac Posted January 8, 2009 Posted January 8, 2009 Skip, If you have access to the vlide, in ACAD, click on the button as shown in my pic to test for unequal brackets, etc... Also, all the commands are colour coded so that you can tell if its a valid LISP command. - helps loads. And don't worry about the first attempt - you should have seen my first attempt! Putting them all on separate lines isn't such a big mistake - after all, script files use separate lines - it could be a common mistake. But just as a pointer, if you are using a "(command "...." function, put everything in there and then close the bracket, like in feargt example. i.e (command "-layer" "M" "TEST" "C" "2" "TEST" "") Hope this helps! Quote
skipsophrenic Posted January 8, 2009 Author Posted January 8, 2009 Cheers 4 that lee. i'll bear it in mind in future Quote
Lee Mac Posted January 8, 2009 Posted January 8, 2009 Your welcome Skip, happy to help. Good luck with your next LISP! 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.