Author Topic: making Tony T's Commandline code work for Bricscad  (Read 1810 times)

0 Members and 1 Guest are viewing this topic.

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
making Tony T's Commandline code work for Bricscad
« on: August 28, 2013, 01:30:53 PM »
In his well known code to send commands to the cmd line, the code starts like this:

public static int Command(params object[] args) {
      if (AcAp.DocumentManager.IsApplicationContext)
        return 0;
      int stat = 0;
      int cnt = 0;

Bricscad's .net api does not have the IsApplicationContext property for DocumentManager.
From what I read, this is not trivial.
Are there other ideas on how to check if the command line is ready for input?
James Maeding

BillZndl

  • Guest
Re: making Tony T's Commandline code work for Bricscad
« Reply #1 on: August 28, 2013, 02:40:17 PM »
Maybe?

if (AcadApp.IsQuiescent)
            {
                try
                {                   
                    OpenGroupCommandDialog.CallGroupCommand();


snip from some code I use.