Jump to content

Multiple command in lisp


Baber62

Recommended Posts

How do I go about incorporating the MULTIPLE command to do a repetitious command in lisp?

 

I have a routine which inserts OS tiles one at a time. To run the command I have to either type in multiple and then the command, or right click and repeat the last command. I want to try and automate the procedure and just type a modified version of the command to run a multiple number of times.

 

Any advice would be appreciated.

 

Thanks in advance.

Link to comment
Share on other sites

How do I go about incorporating the MULTIPLE command to do a repetitious command in lisp?

 

I have a routine which inserts OS tiles one at a time. To run the command I have to either type in multiple and then the command, or right click and repeat the last command. I want to try and automate the procedure and just type a modified version of the command to run a multiple number of times.

 

Any advice would be appreciated.

 

Thanks in advance.

I would suggest just looping your routine and doing it with the following:
(while (> (logand (getvar "CMDACTIVE") 1) 0) 

Link to comment
Share on other sites

Pick pt1 pick pt2 distance pt1-pt2/tile space get int value then look up help re Repeat

 

(setq pt1 (getpoint "Pick p1"))
(setq pt2 (getpoint "pick p2"))
(setq tile (getdist "width of tile"))
(setq howmany (fix (/ (distance pt1 pt2) tile)))
(setq x 0)
(repeat howmany
(alert (rtos (setq x (+ x 1)) 2 0))
)

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...