Jump to content

lastprompt


svorgodne

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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)

 

Link to comment
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
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...