Results 1 to 2 of 2

Thread: pausing a script

  1. #1
    Join Date
    Jul 2005
    Posts
    2

    pausing a script

    Ok, another dumb question - if I write a simple script like this:

    (command "list")
    (command "copyhist")

    - it doesn't pause after the list command. How do you get it to execute the list command and wait until item(s) have been listed before doing the copyhist command? Obviously, you want the program to wait until the items are listed to the text window before doing the copyhist command but it doesn't work that way. Thanks

  2. #2
    Join Date
    Jun 2004
    Location
    Anchorage, Alaska
    Posts
    1,179
    (Answer may vary depending if you're using these commands in a "script" file <.scr extension> or in a lisp roitine)

    Following is some code that pauses autocad to allow completion of a command:

    (while (> (getvar "cmdactive") 0)
    (command pause)
    )

    Try inserting this after the (command "list") line

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •