sean112 Posted July 25, 2016 Share Posted July 25, 2016 What does this Error Message mean : Error: Bad Function T? I tried to do a while loop (setq repetition 0) (if (= flag1 2) (while ((and (>= tpagen 2) (< repetition tpagen)) (setq pp (strcat (itoa repetition) " OF " (itoa tpagen))) (setq repetition (+ 1 repetition)) (Choose))) ) flag1 is a user input value. "Choose" here is a function that is defined, it runs fine once, but at the end, autocad give me that error message. At the end of the code, I put (setq basepointtx (+ 135.5 ( * 1000 repetition))) (setq basepointt (list basepointtx 88)) (command "pasteclip" basepointt)) I wonder if the error is caused by not quoting the the point. How would I quote a point that has a variable in it? Thanks! Quote Link to comment Share on other sites More sharing options...
Tharwat Posted July 25, 2016 Share Posted July 25, 2016 You have extra bracket before the function AND. What is the value that is assigned to the variable 'tpagen' ? Quote Link to comment Share on other sites More sharing options...
sean112 Posted July 25, 2016 Author Share Posted July 25, 2016 You have extra bracket before the function AND.What is the value that is assigned to the variable 'tpagen' ? (action_tile "accept" "(setq tpagen (atoi (get_tile \"Size\")))") It is a user input. It is all the positive integer. I want the while loop to run the "tpagen" times. Quote Link to comment Share on other sites More sharing options...
sean112 Posted July 25, 2016 Author Share Posted July 25, 2016 You have extra bracket before the function AND.What is the value that is assigned to the variable 'tpagen' ? I think that extra parenthesis might just solved the problem. HA. However, is there a way to quote a list with variables? Quote Link to comment Share on other sites More sharing options...
Tharwat Posted July 26, 2016 Share Posted July 26, 2016 I think that extra parenthesis might just solved the problem. HA. However, is there a way to quote a list with variables? Which list ? 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.