Jump to content

Error: Bad Function T and quote a list with variables


sean112

Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...