<?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: programmatically zoom/pan? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3505920#M81552</link>
    <description>&lt;P&gt;Hey guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you seem to have missed my last post:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2012/06/uiview-and-windows-device-coordinates.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2012/06/uiview-and-windows-device-coordinates.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The UIView class provides full support for pan and zoom. That is what it is there for, as far as I can tell.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;BR /&gt;--&lt;BR /&gt;Jeremy Tammik&lt;BR /&gt;Autodesk Developer Network -- &lt;A href="http://www.autodesk.com/joinadn" target="_blank"&gt;http://www.autodesk.com/joinadn&lt;/A&gt;&lt;BR /&gt;The Building Coder -- &lt;A href="http://thebuildingcoder.typepad.com" target="_blank"&gt;http://thebuildingcoder.typepad.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jun 2012 09:17:30 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2012-06-19T09:17:30Z</dc:date>
    <item>
      <title>programmatically zoom/pan?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3106546#M81547</link>
      <description>&lt;P&gt;I'm racking my brains on this one. &amp;nbsp;I can't seem to find a way to programmatically zoom/pan. &amp;nbsp;I know I can zoom to the extents of the selected objects, but that's not what I want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance, Chuck&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2011 17:15:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3106546#M81547</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-27T17:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically zoom/pan?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3109606#M81548</link>
      <description>&lt;P&gt;Don't believe it's possible I would also like to save current extents, center point &amp;amp; zoom for the current view to re-use on another level which would put the user in the same spot.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jul 2011 06:13:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3109606#M81548</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-30T06:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically zoom/pan?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3503884#M81549</link>
      <description>&lt;P&gt;I simply want to Zoom Fit in the current active view. Seems simple but again I can't find the answer. Any takers? Thanks Dale&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2012 05:39:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3503884#M81549</guid>
      <dc:creator>Dale.Bartlett</dc:creator>
      <dc:date>2012-06-18T05:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically zoom/pan?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3504166#M81550</link>
      <description>&lt;P&gt;You could try this worked for what I needed a while ago now...&amp;nbsp;&lt;A target="_blank" href="http://forums.augi.com/showthread.php?106364-lower-amp-upper-bounds-of-the-current-window-view"&gt;http://forums.augi.com/showthread.php?106364-lower-amp-upper-bounds-of-the-current-window-view&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Imports AC_App = Autodesk.AutoCAD.ApplicationServices.Application

Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Interop

Public Class FloorSurferView

    Private pMax As Point3d
    Private pMin As Point3d

    Public Sub New()
        SaveView()
    End Sub

    Private Sub SaveView()

        Dim ed As Editor = AC_App.DocumentManager.MdiActiveDocument.Editor

        Using acView As ViewTableRecord = ed.GetCurrentView()

            Dim pCenter As Point3d = New Point3d(acView.CenterPoint.X, acView.CenterPoint.Y, 0)
            pMin = New Point3d(pCenter.X - (acView.Width / 2), pCenter.Y - (acView.Height / 2), 0)
            pMax = New Point3d(pCenter.X + (acView.Width / 2), pCenter.Y + (acView.Height / 2), 0)

        End Using

    End Sub

    Public Sub Zoom()

        Dim app As AcadApplication = CType(Application.AcadApplication, AcadApplication)
        Dim lower() As Double = New Double() {pMin.X, pMin.Y, pMin.Z}
        Dim upper() As Double = New Double() {pMax.X, pMax.Y, pMax.Z}
        app.ZoomWindow(lower, upper)

    End Sub

End Class&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2012 11:38:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3504166#M81550</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-18T11:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically zoom/pan?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3504714#M81551</link>
      <description>&lt;P&gt;Thanks for the reply, but I need this for Revit (2013). Regards, Dale&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2012 16:03:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3504714#M81551</guid>
      <dc:creator>Dale.Bartlett</dc:creator>
      <dc:date>2012-06-18T16:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically zoom/pan?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3505920#M81552</link>
      <description>&lt;P&gt;Hey guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you seem to have missed my last post:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2012/06/uiview-and-windows-device-coordinates.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2012/06/uiview-and-windows-device-coordinates.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The UIView class provides full support for pan and zoom. That is what it is there for, as far as I can tell.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;BR /&gt;--&lt;BR /&gt;Jeremy Tammik&lt;BR /&gt;Autodesk Developer Network -- &lt;A href="http://www.autodesk.com/joinadn" target="_blank"&gt;http://www.autodesk.com/joinadn&lt;/A&gt;&lt;BR /&gt;The Building Coder -- &lt;A href="http://thebuildingcoder.typepad.com" target="_blank"&gt;http://thebuildingcoder.typepad.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2012 09:17:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3505920#M81552</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2012-06-19T09:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically zoom/pan?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3508714#M81553</link>
      <description>&lt;P&gt;Thanks, Jeremy!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 16:54:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/programmatically-zoom-pan/m-p/3508714#M81553</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-20T16:54:29Z</dc:date>
    </item>
  </channel>
</rss>

