Results 1 to 4 of 4

Thread: LISP Routine - what do I need to do to have a command finish before lisp routine goes on?

  1. #1
    Member
    Join Date
    2017-11
    Posts
    10
    Login to Give a bone
    0

    Default LISP Routine - what do I need to do to have a command finish before lisp routine goes on?

    Using autocad 2018

    the revcloud command does not finish, & the lisp routine continues on. Which makes it not work correctly. What do I need to add to make routine wait till revcloud command is done before continuing on with rest of lisp routine?

    Here is what I have:
    Code:
    (defun C:jt2 ()
    
      (setq m:sc (getvar "dimscale"))
    
      (setq m:REVNUM (getstring "\nEnter the revision set: "))
    
      (command "-layer" "m" (strcat "REVISION_CLOUDS_" m:revnum) "")
    
      (initcommandversion -1)
      (command "_revcloud" "s" "c" "p" "a" (* 0.5 m:sc) "")
    
      (setq m:TAGLAY (strcat "REVTAG-" m:REVNUM))
      (setq m:PLACETAG (getpoint "\nPlace the cloud's tag: "))
      (command "-layer" "m" m:TAGLAY "")
      (command "._insert" "cloudtag" m:PLACETAG (getvar "DIMSCALE") "" "0" m:revnum )
      (princ "\nNow place the leader using a 3-point arc. ")
      
      (command "._arc")
    )
    I appreciate anyone's help
    Last edited by BlackBox; 2017-11-16 at 02:22 PM. Reason: Please use [CODE] Tags

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,536
    Login to Give a bone
    0

    Default Re: LISP Routine - what do I need to do to have a command finish before lisp routine goes on?

    Welcome to AUGI.

    Try adding this WHILE loop:

    Code:
    ;; <snip>
    
      (initcommandversion -1)
      (command "_revcloud" "s" "c" "p" "a" (* 0.5 m:sc) "")
      (while (= 1 (getvar 'cmdactive))
        (command pause)
      )
    
    ;; <snip>

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  3. #3
    Member
    Join Date
    2017-11
    Posts
    10
    Login to Give a bone
    0

    Default Re: LISP Routine - what do I need to do to have a command finish before lisp routine goes on?

    Thanks that worked.

    Have a great day!!!

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,536
    Login to Give a bone
    0

    Default Re: LISP Routine - what do I need to do to have a command finish before lisp routine goes on?

    Quote Originally Posted by jhein759286 View Post
    Thanks that worked.

    Have a great day!!!
    Happy Friday.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

Similar Threads

  1. LISP Routine that works with AREA command
    By Paul.C.Rasmussen in forum AutoLISP
    Replies: 7
    Last Post: 2016-01-03, 07:52 PM
  2. Use Saveas Command from a Lisp Routine
    By CADdancer in forum AutoLISP
    Replies: 6
    Last Post: 2011-06-23, 03:01 PM
  3. LISP routine for Area Command
    By Mac Demer in forum AutoCAD General
    Replies: 12
    Last Post: 2010-07-14, 06:24 PM
  4. Replies: 14
    Last Post: 2007-09-03, 08:01 PM
  5. BURST command in Lisp Routine
    By mhollar in forum AutoLISP
    Replies: 6
    Last Post: 2005-12-19, 11:08 PM

Posting Permissions

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