<?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: Zoom to selected entities in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554658#M69132</link>
    <description>Thanks a lot tony, that's awesome..the only problem is that selected entities are no more highlighted, any suggestion?</description>
    <pubDate>Thu, 10 Sep 2009 20:32:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-09-10T20:32:02Z</dc:date>
    <item>
      <title>Zoom to selected entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554656#M69130</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I wrote a simple program which selects some entities from a drawing. Is there a way to zoom to the result programmatically?</description>
      <pubDate>Thu, 10 Sep 2009 15:23:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554656#M69130</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-10T15:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to selected entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554657#M69131</link>
      <description>{code}&lt;BR /&gt;
&lt;BR /&gt;
namespace MyExtensionMethods&lt;BR /&gt;
{&lt;BR /&gt;
   public static class EditorExtensionMethods&lt;BR /&gt;
   {&lt;BR /&gt;
      static MethodInfo runCommand = typeof( Editor ).GetMethod(&lt;BR /&gt;
           "RunCommand", BindingFlags.NonPublic | BindingFlags.Instance );&lt;BR /&gt;
&lt;BR /&gt;
      public static PromptStatus Command( this Editor editor, params &lt;BR /&gt;
object[] args )&lt;BR /&gt;
      {&lt;BR /&gt;
         return (PromptStatus) runCommand.Invoke( editor, new object[] { &lt;BR /&gt;
args } );&lt;BR /&gt;
      }&lt;BR /&gt;
&lt;BR /&gt;
      public static void ZoomObjects( ObjectId[] ids )&lt;BR /&gt;
      {&lt;BR /&gt;
         Editor editor = &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;
         Application.SetSystemVariable( "CMDECHO", 0 );&lt;BR /&gt;
         Command( editor, "._ZOOM", "_O", ids );&lt;BR /&gt;
      }&lt;BR /&gt;
   }&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2010&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;APT42&gt; wrote in message news:6252337@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
I wrote a simple program which selects some entities from a drawing. Is &lt;BR /&gt;
there a way to zoom to the result programmatically?&lt;/APT42&gt;</description>
      <pubDate>Thu, 10 Sep 2009 16:37:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554657#M69131</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-10T16:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to selected entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554658#M69132</link>
      <description>Thanks a lot tony, that's awesome..the only problem is that selected entities are no more highlighted, any suggestion?</description>
      <pubDate>Thu, 10 Sep 2009 20:32:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554658#M69132</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-10T20:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to selected entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554659#M69133</link>
      <description>You have to reselect them because any command that's started&lt;BR /&gt;
clears the current selection.&lt;BR /&gt;
&lt;BR /&gt;
You can use this API to select them:&lt;BR /&gt;
&lt;BR /&gt;
  Autodesk.AutoCAD.Internal.Utils.SelectObjects();&lt;BR /&gt;
&lt;BR /&gt;
You have to add the CommandFlags.Redraw flag to your command&lt;BR /&gt;
method attribute for the selection to remain after the command ends.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2010&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;APT42&gt; wrote in message news:6252627@discussion.autodesk.com...&lt;BR /&gt;
Thanks a lot tony, that's awesome..the only problem is that selected &lt;BR /&gt;
entities are no more highlighted, any suggestion?&lt;/APT42&gt;</description>
      <pubDate>Thu, 10 Sep 2009 22:09:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554659#M69133</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-10T22:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to selected entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554660#M69134</link>
      <description>I actually had tried it, &lt;BR /&gt;
&lt;BR /&gt;
Autodesk.AutoCAD.Internal.Utils.SelectObjects(final_entities);&lt;BR /&gt;
                        Autodesk.AutoCAD.Internal.Utils.ZoomObjects(false);&lt;BR /&gt;
                        System.Windows.Forms.Application.UseWaitCursor = false;&lt;BR /&gt;
&lt;BR /&gt;
and also added the CommandFlags.Redraw&lt;BR /&gt;
The problem is that after zooming, it goes back to its original size, the zoom size does not persist.

Edited by: apt42 on Sep 11, 2009 10:53 PM</description>
      <pubDate>Thu, 10 Sep 2009 22:40:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554660#M69134</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-10T22:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to selected entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554661#M69135</link>
      <description>Tony, how do you go about zooming and selecting in 2009 without internal.utils?&lt;BR /&gt;
&lt;BR /&gt;
edited... I guess i just needed to add the internal dll to my references.

Edited by: ViktorCad on Oct 30, 2009 10:26 PM</description>
      <pubDate>Fri, 30 Oct 2009 21:51:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554661#M69135</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-30T21:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to selected entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554662#M69136</link>
      <description>You can use Internal.Utils in 2009, you just need to add&lt;BR /&gt;
a reference to AcMgdInternal.dll.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2010&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;VIKTORCAD&gt; wrote in message news:6281493@discussion.autodesk.com...&lt;BR /&gt;
Tony, how do you go about zooming and selecting in 2009 without &lt;BR /&gt;
internal.utils?&lt;BR /&gt;
&lt;BR /&gt;
edited... I guess i just needed to add the internal dll to my references.&lt;BR /&gt;
&lt;BR /&gt;
Edited by: ViktorCad on Oct 30, 2009 10:26 PM&lt;/VIKTORCAD&gt;</description>
      <pubDate>Sat, 31 Oct 2009 03:15:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/zoom-to-selected-entities/m-p/2554662#M69136</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-31T03:15:00Z</dc:date>
    </item>
  </channel>
</rss>

