Baber62 Posted December 3, 2015 Share Posted December 3, 2015 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. Quote Link to comment Share on other sites More sharing options...
broncos15 Posted December 3, 2015 Share Posted December 3, 2015 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) Quote Link to comment Share on other sites More sharing options...
tombu Posted December 3, 2015 Share Posted December 3, 2015 It would be an easy fix it you posted the lisp. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 4, 2015 Share Posted December 4, 2015 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)) ) Quote Link to comment Share on other sites More sharing options...
hosyn Posted December 4, 2015 Share Posted December 4, 2015 It's Great:) 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.