TheSwamp

Code Red => .NET => Topic started by: Xander on August 31, 2009, 05:51:20 AM

Title: Commandline - Pulling the remaining 3 lines?
Post by: Xander 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
Title: Re: Commandline - Pulling the remaining 3 lines?
Post by: SomeCallMeDave 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.
Title: Re: Commandline - Pulling the remaining 3 lines?
Post by: Kerry 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
Title: Re: Commandline - Pulling the remaining 3 lines?
Post by: Xander 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