Jump to content
svorgodne

lastprompt

Recommended Posts

svorgodne

Hello everyone,

 

What is the exact use for the system variable "Lastprompt"?

 

I want preciselly its value through autolisp to copy/paste automatically as text somewhere else.

 

Nothing more, nothing less.

 

Any ideas?

 

Thanks in advance

Sergio

Share this post


Link to post
Share on other sites
dlanorh
Posted (edited)

lastprompt : This string is identical to the last line seen at the Command prompt and includes any user input.

 

Test routine

 

(defun c:testLP ( / tmp lp)
	(setq tmp (getpoint "\nSelect Point : ") 
		  lp (getvar 'lastprompt)
    )
    (princ lp)
)

This doesn't return "Select Point :  (0.0 0.0 0.0)" but  "command c:testLP" as this was the last thing run on the command line.

 

If you enter (princ (getvar 'lastprompt)) at the "Command:" prompt it returns  "Command: (princ (getvar 'lastprompt))"

 

 

Edited by dlanorh

Share this post


Link to post
Share on other sites
tombu

It's not really useful in lisp, but you can display the value you're looking for in the Ribbon using DIESEL for Display Name like :

$(getvar,lastprompt)

 

Share this post


Link to post
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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