Abrasive Posted November 13, 2022 Share Posted November 13, 2022 Trying to make a routine where my dimension command stays persistent. I feel like this should be basic but .....I can't get it ;PCD forPersistent Click Dimension (defun c:PCD ( ) (command "_.Dimaligned" "_E") (while (= (getvar "CmdActive") 0) (command "" "_.Dimaligned" "_E") ) )  What I would like to do is just single click entities without starting the command over and when I'm done hit Esc to end the command.... I hope that makes sense? Quote Link to comment Share on other sites More sharing options...
Tharwat Posted November 14, 2022 Share Posted November 14, 2022 You can use the command Multiple then type the name of command you want to repeat.  Command: multiple Enter command name to repeat: dimaligned  1 Quote Link to comment Share on other sites More sharing options...
Steven P Posted November 14, 2022 Share Posted November 14, 2022 I think the problem is your 'command "_.dimaligned" .....)  If you work through the command manually - always a good way to go - it asks for 3 inputs after the command (end A, end B and extension), you'll need to add a "pause" to allow for user input (see below).  Not sure about the while loop - would an escape escape from the full lISP or just the command - not so important with this but for others if you want to do something after it might be worth checking that   (defun c:PCD ( ) (command "_.Dimaligned" pause pause pause) (while (= (getvar "CmdActive") 0) (command "_.Dimaligned" pause pause pause) ) )   Quote Link to comment Share on other sites More sharing options...
Abrasive Posted November 14, 2022 Author Share Posted November 14, 2022 2 hours ago, Steven P said: I think the problem is your 'command "_.dimaligned" .....)  If you work through the command manually - always a good way to go - it asks for 3 inputs after the command (end A, end B and extension), you'll need to add a "pause" to allow for user input (see below).  Not sure about the while loop - would an escape escape from the full lISP or just the command - not so important with this but for others if you want to do something after it might be worth checking that   (defun c:PCD ( ) (command "_.Dimaligned" pause pause pause) (while (= (getvar "CmdActive") 0) (command "_.Dimaligned" pause pause pause) ) )    pause!!! Thank you, that worked.... 1 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.