MichaelAllfire Posted December 11, 2018 Posted December 11, 2018 Hi all, beginner lisp user here I am working on a little lisp tool to run through a few commands consecutively, but am having trouble getting them to run. The below example completes the first command, but won't run the second. I am looking at running several other commands after this one, but am looking to lock down this problem first. (defun c:ssl () (command "isolateobjects") (command "view" "left") ) Thoughts? Thanks heaps! Quote
BIGAL Posted December 11, 2018 Posted December 11, 2018 Your command is to simple "Isolateobjects" expects you to pick at least one object and return its layer then press enter to stop picking objects, so you need to make a list of objects . (command "isolateobjects" (ssget) "") Quote
pkenewell Posted December 14, 2018 Posted December 14, 2018 (edited) In a more general sense, successive command calls will not wait for the previous ones to finish. You need to either supply all the input for the (command) function to finish the called command, or use the following example to create a loop to allow the user to pick an unknown amount of options to the command. (command "_.pline") (while (= (logand (getvar "cmdactive") 1) 1) (command pause) ) (command "_.circle") Edited December 14, 2018 by pkenewell 1 Quote
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.