Author Topic: Commandline - Pulling the remaining 3 lines?  (Read 2699 times)

0 Members and 1 Guest are viewing this topic.

Xander

  • Guest
Commandline - Pulling the remaining 3 lines?
« on: August 31, 2009, 05:51:20 AM »
I have searched through every byte of the information network and found nothing in relation to this. 
I am attempting to read the last 3 lines in the command line, and the current prompt if possible.  I know it is possible to send/receive commands, but is it actually possible to get the text in the command line using AutoCAD API?

Regards,
Xander

SomeCallMeDave

  • Guest
Re: Commandline - Pulling the remaining 3 lines?
« Reply #1 on: August 31, 2009, 07:43:38 AM »
In version 2009, acmdginternal.dll has a method  Autodesk.Autocad.Internal.Utils.GetLastCommandLines((int lastLines, bool ignoreNull)

(it may be in other versions, but I don't have time right now to check)

I think this does what you want.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Commandline - Pulling the remaining 3 lines?
« Reply #2 on: September 07, 2009, 07:12:15 PM »
In AC2010 most (all ?) of the methods from acmdginternal.dll have been relocated into ACMGD,
So ..
public static List<string> GetLastCommandLines(int lastLines, bool ignoreNull);
 
Declaring Type: Autodesk.AutoCAD.Internal.Utils
Assembly: acmgd, Version=18.0.0.0
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Xander

  • Guest
Re: Commandline - Pulling the remaining 3 lines?
« Reply #3 on: September 13, 2009, 08:53:19 PM »
Thank-you both for your replies.  Both methods work for 2010 and grab what I am after.

Regards,
Xander