Jump to content

Recommended Posts

Posted

...by me that is (physically)!

 

Using DCL I have a button that when I click I'd like to draw a polyline, now I can do this if I end my script with...

 

(command "_.PLINE")

 

..but what if I want to continue running my script immediately after I have exited the polyline command with...

 

(setq e (entlast))

 

..without a further call with entsel? Presently I get the Invalid point error message.

 

Here's calling for you help!

Posted

Add something like this to your script:

 

(while (> (getvar 'CmdActive) 0) (command pause))

i.e.

 

(defun c:pltry ()
   (command "pline"
       (while (> (getvar 'CmdActive) 0) (command pause)) 
   ) ; end pline
   (alert "It Worked!")
   (princ)
)

Or, as in your example with "entlast" ....

 

(defun c:plent (/ pl1)
   (command "pline"
       (while (> (getvar 'CmdActive) 0) (command pause)) 
   ) ; end pline
   (setq pl1 (entlast))

;    [b][color=Red] A bunch of extra commands you might want to add go here....[/color][/b]

   (princ)
)
Posted

Thanks, Lee!

 

That's helped me a great deal.

 

God bless you.

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