<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Auto close dialog by default selection in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9686489#M18821</link>
    <description>&lt;P&gt;I've tested with AutoCAD 2019 (with all updates). This code works as expected:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IFRAME src="https://screencast.autodesk.com/Embed/Timeline/98733527-c529-4ad6-a237-1fc3b0516afd" width="696" height="685" frameborder="0" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen"&gt;&lt;/IFRAME&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Aug 2020 07:46:47 GMT</pubDate>
    <dc:creator>Alexander.Rivilis</dc:creator>
    <dc:date>2020-08-12T07:46:47Z</dc:date>
    <item>
      <title>Auto close dialog by default selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9671793#M18813</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 467px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/803072i5ADE9247D63BE86F/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 715px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/803073i39BC92933BFDA7B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 11:31:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9671793#M18813</guid>
      <dc:creator>milindnalgirkar</dc:creator>
      <dc:date>2020-08-04T11:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Auto close dialog by default selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9671822#M18814</link>
      <description>&lt;P&gt;This post can help you: &lt;A href="http://adndevblog.typepad.com/autocad/2015/04/dismissing-popup-dialogs-in-autocad.html" target="_blank"&gt;http://adndevblog.typepad.com/autocad/2015/04/dismissing-popup-dialogs-in-autocad.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 11:59:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9671822#M18814</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2020-08-04T11:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Auto close dialog by default selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9673066#M18815</link>
      <description>&lt;P&gt;Other solution: &lt;A href="https://adndevblog.typepad.com/autocad/2013/07/disable-task-dialogs-programmatically.html" target="_blank"&gt;https://adndevblog.typepad.com/autocad/2013/07/disable-task-dialogs-programmatically.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Also read comments to that post.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 20:27:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9673066#M18815</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2020-08-04T20:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Auto close dialog by default selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9674218#M18816</link>
      <description>&lt;P&gt;Hello &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5951070"&gt;@milindnalgirkar&lt;/a&gt;&amp;nbsp; !&lt;BR /&gt;&lt;BR /&gt;Great to see you here on .NET Forum.&lt;BR /&gt;&lt;BR /&gt;Did Alexander's links helped you to find a solution?&lt;BR /&gt;If yes, please click on the &lt;FONT color="#008000"&gt;"Accept as Solution"&lt;/FONT&gt; button as then also other community users can easily find and benefit from the information.&lt;BR /&gt;If not please don't hesitate to give an update here in your topic so all members know what ́s the progression on your question is and what might be helpful to achieve what you ́re looking for. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 12:16:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9674218#M18816</guid>
      <dc:creator>lena.talkhina</dc:creator>
      <dc:date>2020-08-05T12:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Auto close dialog by default selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9679301#M18817</link>
      <description>&lt;P&gt;I tried almost all options..nothing is working...&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 15:09:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9679301#M18817</guid>
      <dc:creator>milindnalgirkar</dc:creator>
      <dc:date>2020-08-07T15:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Auto close dialog by default selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9679340#M18818</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5951070"&gt;@milindnalgirkar&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I tried almost all options..nothing is working...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please show your code was tried to use and maybe I can help you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 15:20:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9679340#M18818</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2020-08-07T15:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Auto close dialog by default selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9679895#M18819</link>
      <description>&lt;P&gt;Try this code:&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;using Autodesk.AutoCAD.Runtime;
using Autodesk.Internal.Windows;

// This line is not mandatory, but improves loading performances
[assembly: CommandClass(typeof(CloseCommanLine.MyCommands))]

namespace CloseCommanLine
{
  public class MyCommands
  {
    
    [CommandMethod("CC")]
    public void CC()
    {
      EnableCloseCommandLineWindow();
      Autodesk.AutoCAD.Internal.Utils.CloseCommandLine();
      DisableCloseCommandLineWindow();
    }
    static void EnableCloseCommandLineWindow()
    {
      Autodesk.AutoCAD.Internal.Windows.ProfileManager.LoadHideableDialogSettingsDictionary();
      HideableDialogSettingsDictionary dict =
        Autodesk.Windows.TaskDialog.HideableDialogSettingsDictionary;
      if (!dict.ContainsKey("MainFrame.CommandLineHideWindow"))
      {
        HideableDialogSettings sets = new HideableDialogSettings();
        sets.Application = "";
        sets.Id = "MainFrame.CommandLineHideWindow";
        sets.Title = "Command Line – Close Window";
        sets.Category = "Command Line";
        sets.Result = 6;
        dict.Add(sets);
      }
      try
      {
        dict.SetResult("MainFrame.CommandLineHideWindow", 6);
        Autodesk.AutoCAD.Internal.Windows.ProfileManager.SaveHideableDialogSettingsDictionary();
      }
      catch { }
    }
    static void DisableCloseCommandLineWindow()
    {
      try
      {
        Autodesk.AutoCAD.Internal.Windows.ProfileManager.LoadHideableDialogSettingsDictionary();
        HideableDialogSettingsDictionary dict =
          Autodesk.Windows.TaskDialog.HideableDialogSettingsDictionary;
        if (dict.ContainsKey("MainFrame.CommandLineHideWindow"))
        {
          dict.Remove("MainFrame.CommandLineHideWindow");
        }
        Autodesk.AutoCAD.Internal.Windows.ProfileManager.SaveHideableDialogSettingsDictionary();
      }
      catch { }
    }
  }
}
&lt;/LI-CODE&gt;
&lt;P&gt;You have to add references to AdWindows.dll and AcWindows.dll&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 20:47:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9679895#M18819</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2020-08-07T20:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Auto close dialog by default selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9686370#M18820</link>
      <description>&lt;P&gt;Thank you so much for reply. This solution works perfectly to Autocad 2020 and 2021, but is not working to Autocad&amp;nbsp; 2019.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any reason to this? Please suggest.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 06:31:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9686370#M18820</guid>
      <dc:creator>milindnalgirkar</dc:creator>
      <dc:date>2020-08-12T06:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Auto close dialog by default selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9686489#M18821</link>
      <description>&lt;P&gt;I've tested with AutoCAD 2019 (with all updates). This code works as expected:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IFRAME src="https://screencast.autodesk.com/Embed/Timeline/98733527-c529-4ad6-a237-1fc3b0516afd" width="696" height="685" frameborder="0" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen"&gt;&lt;/IFRAME&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 07:46:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/auto-close-dialog-by-default-selection/m-p/9686489#M18821</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2020-08-12T07:46:47Z</dc:date>
    </item>
  </channel>
</rss>

