Jump to content

Recommended Posts

Posted

Is it possible to loop through commands until the user excapes?

 

I.E: User clicks button on my DCL box..

 

.. while active...

 

(setq pt (getpoint "\nPlace your target notes...") )

(command "_.CIRCLE" pt 10)

(command...

(command "_.TEXT..... with increment

 

...loop until user escapes...

 

Please assist.

Posted

Hi John,

 

Use a "while" function:

 

i.e.

 

(while
    (/= (setq pt (getpoint "\nPlace your target notes...") ) nil)
    (command "_.CIRCLE" pt 10)
    (command...
    (command "_.TEXT..... with increment
) ; end while

Posted

No probs John,

 

Looks like you're creating a LISP to place some notes, I would suggest possibly using an "and" command coupled with the "while"

 

i.e.

 

(while
     (and
           (/= (setq pt1 (getpoint "\nSelect Point for Text: ")) nil)
           (/= (setq txt (getstring t "\nSpecify Note Text: ")) "")
     )
     (command "_circle"  etc etc...
) ; end while

This way, the LISP requires both data inputs to continue - and the user can exit the LISP at either the "Select Point" stage or the "Specify Text" stage.

 

But perhaps this isn't what you're after. - just a suggestion :)

Posted

...thus making sure all user entry is in before committing anything to the database!

 

I like it, thanks again. :)

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