Hiding commandline through Sendcommand

Hiding commandline through Sendcommand

Anonymous
Not applicable
1,819 Views
5 Replies
Message 1 of 6

Hiding commandline through Sendcommand

Anonymous
Not applicable

Hi,

 

Command line window is floating at the bottom even when AutoCAD visible flag is set to false. I have tried sending the command 'Commandlinehide' through sendcommand from c# code but didn't work. I guess it is because waiting for response from prompt window(yes/no). I need to set this command from C# code. Is there any way to hide command prompt from vb or c# other than 'CTRL + 9'?

 

Thanks,

Shalini.

0 Likes
1,820 Views
5 Replies
Replies (5)
Message 2 of 6

Ed__Jobe
Mentor
Mentor

This works for me.

        [CommandMethod("CC")]
        public void CloseCommandLine()
        {
            Autodesk.AutoCAD.Internal.Utils.CloseCommandLine();
        }

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 6

Anonymous
Not applicable

Hi,

 

Thanks for the reply. What's the assembly(dll) do I need to include to have 'Autodesk.AutoCAD.Internal.Utils.CloseCommandLine()' ?

I am using AUTOCAD 2020.

 

Thanks,

Shalini.

0 Likes
Message 4 of 6

Ed__Jobe
Mentor
Mentor

Just the minimum 3 you would normally reference, AcMgd, AcDbMgd and AcCorreMgd. But it's in AcMgd.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 5 of 6

Anonymous
Not applicable

Hi,

 

I am using 'Autodesk.AutoCAD.Internal.Utils.CloseCommandLine();' as attached in Image1 for closing command line. But command waits for input and after 'enter' it prompts for confirmation dialog box. I need to close it without user input.

Please find the attachements.

 

Thanks,

Shalini.

0 Likes
Message 6 of 6

Ed__Jobe
Mentor
Mentor

I haven't found a way to do it programmatically, but if you look at your image3, you can check the option to always close and you won't be prompted anymore.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes