Author Topic: Can Vlisp capture last text message , display the acad.exe?  (Read 1499 times)

0 Members and 1 Guest are viewing this topic.

d2010

  • Bull Frog
  • Posts: 326
Can Vlisp capture last text message , display the acad.exe?
« on: September 12, 2023, 05:57:28 PM »
Hello?
My command -Plot display the message
"Enter paper units [Inches/Millimeters] <Inches>: ",
but I need store this message into variabile with name = allquestions.


  (setq lastquestion (getvar ???))
  (setq allquestions (cons lastquestion allquestions))
.............
  (prompt "\n Do you want all questions messages from plot?"))
  (setq ask (getint "1=yes))
  (if (= ask 1) (princ allquestions))

   

BIGAL

  • Swamp Rat
  • Posts: 1434
  • 40 + years of using Autocad
Re: Can Vlisp capture last text message , display the acad.exe?
« Reply #1 on: September 12, 2023, 07:03:57 PM »
What is problem copy the output from the text screen paste into notepad and convert to lisp. F2
A man who never made a mistake never made anything

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8804
  • AKA Daniel
Re: Can Vlisp capture last text message , display the acad.exe?
« Reply #2 on: September 12, 2023, 08:01:24 PM »
Not that I know of from lisp, but in ARX you can use undocumented functions

acedGetLastCommandLines
and
acedGetCommandPromptString

not sure if they are in .NET

in Python it would be

acedGetCommandPromptString(number of lines, bool ignore null)
Code - Python: [Select]
  1. def PyRxCmd_doit(CmdFlags = Ap.CmdFlags.TRANSPARENT):
  2.     try:
  3.         print(Ed.Core.getLastCommandLines(5,True))
  4.     except Exception as err:
  5.         traceback.print_exception(err)
  6.  

Quote
Command: DOIT
['Command: DOIT', 'HIDE Regenerating model.', 'Command: HI']

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2151
  • class keyThumper<T>:ILazy<T>
Re: Can Vlisp capture last text message , display the acad.exe?
« Reply #3 on: September 12, 2023, 09:10:09 PM »

Code - C#: [Select]
  1. Autodesk.AutoCAD.Internal.Utils.GetLastCommandLines(lineCount, ignoreNull);


must make sure that is added to the beta Request Wishlist
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.