Jump to content

Persistent Click Dimension


Abrasive

Recommended Posts

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?

Link to comment
Share on other sites

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

 

 

Link to comment
Share on other sites

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

  • Like 1
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...