CivilTechSource Posted 3 hours ago Posted 3 hours ago Hi again, Looking to create a lisp that will bring a block into a drawing and will loop and keep adding it. The catch is that I want to see the visual of the block similar to the -insert command. So I managed to achieve the visual by adding the pause. But how do I make the while loop keep going without the getpoint? Is there a way I could check for pause? Thanks again (while (setq ins (getpoint "\nSpecify point for block (ENTER to exit): ")) (command "-INSERT" GV-Block pause "" "" "0") ) Quote
CivilTechSource Posted 3 hours ago Author Posted 3 hours ago I think I solved it. Is this the most optimal way? (while continue (command "-INSERT" GV-Block pause "" "" "0") (if (= (getvar "CMDSTAT") 0) (setq continue nil) ) ) Quote
devitg Posted 2 hours ago Posted 2 hours ago 1 hour ago, CivilTechSource said: I think I solved it. Is this the most optimal way? (while continue (command "-INSERT" GV-Block pause "" "" "0") (if (= (getvar "CMDSTAT") 0) (setq continue nil) ) ) @CivilTechSource Quote Command: CMDSTAT Unknown command "CMDSTAT". Press F1 for help. Quote
Steven P Posted 1 hour ago Posted 1 hour ago (edited) If it is just a stand alone action, this will work but you have to escape out of it to cancel - you cannot have more to the routine, so stand alone only (while (= (command "-INSERT" GV-Block pause "" "" "0") nil) ) or this (while (setq pt1 (getpoint "Press LH Mouse to repeat, Enter / Space cancel")) (= (command "-insert" "circuitBreaker" pause 1 1 0) nil) ) Edited 39 minutes ago by Steven P 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.