<?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 view in drawing: in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/5829639#M144274</link>
    <description>&lt;P&gt;Thanks Sanjay,&lt;/P&gt;&lt;P&gt;i was stuck at this stage while attempting drawingview.camera.saveasbimap. It was giving "not implemented" error; your solution has given a workaround.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Sep 2015 14:41:34 GMT</pubDate>
    <dc:creator>kiruba</dc:creator>
    <dc:date>2015-09-23T14:41:34Z</dc:date>
    <item>
      <title>Zoom to view in drawing:</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655306#M144263</link>
      <description>I have a program that either cycles through all the base views of a drawing or works with a selected view and pushes properties that I need in the drawing file back to the part or assembly file, currently I am showing what view is being edited by selecting it so that it shows up with this:&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
oDoc.SelectSet.Select(oView)&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
This gives the user an idea of what is going on at that time and if they need to include or exclude any information. My question is how can I zoom to that view rather than selecting it since it can be hard to see the little dotted selection line of a view.</description>
      <pubDate>Fri, 26 Mar 2010 01:41:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655306#M144263</guid>
      <dc:creator>Mike.Wohletz</dc:creator>
      <dc:date>2010-03-26T01:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to view in drawing:</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655307#M144264</link>
      <description>Try the following macro. Select a drawing view before running it.&lt;BR /&gt;
&lt;BR /&gt;
Sanjay-&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub ZoomToDrawingView()&lt;BR /&gt;
&lt;BR /&gt;
    Dim oDoc As DrawingDocument&lt;BR /&gt;
    Set oDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
    Dim oDrawingView As DrawingView&lt;BR /&gt;
    Set oDrawingView = oDoc.SelectSet.Item(1)&lt;BR /&gt;
&lt;BR /&gt;
    Dim oTG As TransientGeometry&lt;BR /&gt;
    Set oTG = ThisApplication.TransientGeometry&lt;BR /&gt;
&lt;BR /&gt;
    Dim oView As View&lt;BR /&gt;
    Set oView = ThisApplication.ActiveView&lt;BR /&gt;
&lt;BR /&gt;
    Dim oCamera As Camera&lt;BR /&gt;
    Set oCamera = oView.Camera&lt;BR /&gt;
&lt;BR /&gt;
    Dim oEyePt As Point&lt;BR /&gt;
    Set oEyePt = oTG.CreatePoint(oDrawingView.Center.X, &lt;BR /&gt;
oDrawingView.Center.Y, oCamera.Eye.Z)&lt;BR /&gt;
    oCamera.Eye = oEyePt&lt;BR /&gt;
&lt;BR /&gt;
    Dim oTargetPt As Point&lt;BR /&gt;
    Set oTargetPt = oTG.CreatePoint(oDrawingView.Center.X, &lt;BR /&gt;
oDrawingView.Center.Y, oCamera.Target.Z)&lt;BR /&gt;
    oCamera.Target = oTargetPt&lt;BR /&gt;
&lt;BR /&gt;
    Call oCamera.SetExtents(oDrawingView.Width * 2, oDrawingView.Height * 2)&lt;BR /&gt;
&lt;BR /&gt;
    oCamera.Apply&lt;BR /&gt;
&lt;BR /&gt;
End Sub</description>
      <pubDate>Fri, 26 Mar 2010 18:29:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655307#M144264</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-26T18:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to view in drawing:</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655308#M144265</link>
      <description>I just had an interesting thought.  What if you could SetExtents based the view and all annotations (or other geometry if applicable) associated to the view.  In other words, calculate a tight box around everything associated to that view.  Starting with the view as the parent, can I loop through all its child objects (I'm assuming 2d geometry of the model) and then any associated annotations.  I would need to somehow be able to calculate a rangebox (may have to be a Collection of Box2d) of where each object exists in sheet space.  iterate through all those rangebox to figure a min X, max X min Y &amp;amp; max Y (i.e. a rangebox containing all geometry associated to the view).</description>
      <pubDate>Fri, 26 Mar 2010 20:47:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655308#M144265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-26T20:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to view in drawing:</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655309#M144266</link>
      <description>Yes, that would be useful. and would be possible to do in the way that you &lt;BR /&gt;
outlined (most drawing objects now support a RangeBox property). There are &lt;BR /&gt;
still a few annotations that the API doesn't support (welding symbols, &lt;BR /&gt;
etc.) - but not too many.&lt;BR /&gt;
&lt;BR /&gt;
Sanjay-</description>
      <pubDate>Fri, 26 Mar 2010 21:11:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655309#M144266</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-26T21:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to view in drawing:</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655310#M144267</link>
      <description>Can you get me started?  Looking at the View object, I can't see a Property that leads me to the 2D geometry on the View.  Also, how do I obtain object associated to views like balloons, dimensions, etc (i.e. parent child relationship)?</description>
      <pubDate>Mon, 29 Mar 2010 12:41:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655310#M144267</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-29T12:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to view in drawing:</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655311#M144268</link>
      <description>A view in a drawing is represented by a DrawingView object. However, &lt;BR /&gt;
annotations (such as notes, balloons, etc.) are on the Sheet object. You'd &lt;BR /&gt;
have to iterate over the annotations on a sheet and filter out the ones that &lt;BR /&gt;
are associated with a drawing view. The process to get the associated view &lt;BR /&gt;
is, unfortunately, different for each annotation. For a balloon, &lt;BR /&gt;
Balloon.ParentView provides that information. But for other annotations, &lt;BR /&gt;
you'll need to drill down to the geometry they attach to and hence get to &lt;BR /&gt;
the associated view.&lt;BR /&gt;
&lt;BR /&gt;
Sanjay-</description>
      <pubDate>Mon, 29 Mar 2010 23:46:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655311#M144268</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-29T23:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to view in drawing:</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655312#M144269</link>
      <description>Ok but I need a little more detail.  I can't see how to drill down.  Can you give me one short example (pseudo code)?  I'm looking at the members of the GeneralDimension for instance and I can't tell which member contains the data I need.  Even if I did know, whats the data's name that gets me the associated view?</description>
      <pubDate>Wed, 31 Mar 2010 19:10:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655312#M144269</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-31T19:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to view in drawing:</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655313#M144270</link>
      <description>All I need is a nudge in the right direction.  I've been poking around the API and can't see the realtionship bewteen and Annotation and its View.</description>
      <pubDate>Tue, 06 Apr 2010 17:03:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655313#M144270</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-06T17:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to view in drawing:</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655314#M144271</link>
      <description>Sorry I haven't been following this thread, but from what you say here, I &lt;BR /&gt;
would suspect if you stepped up the Parent structure of the annotation you &lt;BR /&gt;
would eventually get to the view. ie.... oannotation.parent.parent.....etc.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
KWiKMcad&lt;BR /&gt;
Kent Keller&lt;BR /&gt;
"Cadfish1" wrote in message news:6367873@discussion.autodesk.com...&lt;BR /&gt;
All I need is a nudge in the right direction.  I've been poking around the &lt;BR /&gt;
API and can't see the realtionship bewteen and Annotation and its View.</description>
      <pubDate>Tue, 06 Apr 2010 17:54:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655314#M144271</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-06T17:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to view in drawing:</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655315#M144272</link>
      <description>Consider the case of a linear general dimension.This is represented by the &lt;BR /&gt;
LinearGeneralDimension object (which derives from GeneralDimension). The &lt;BR /&gt;
following will return the first drawing curve (DrawingCurve object) that the &lt;BR /&gt;
dimension is attached to: LinearGeneralDimension.IntentOne.Geometry. &lt;BR /&gt;
Finally, DrawingCurve.Parent returns the drawing view that contains this &lt;BR /&gt;
curve.&lt;BR /&gt;
&lt;BR /&gt;
You'll need to similarly special case each annotation.&lt;BR /&gt;
&lt;BR /&gt;
Sanjay-</description>
      <pubDate>Tue, 06 Apr 2010 17:59:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655315#M144272</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-06T17:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to view in drawing:</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655316#M144273</link>
      <description>Thanks Sanjay &amp;amp; Kent.</description>
      <pubDate>Tue, 06 Apr 2010 18:37:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/2655316#M144273</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-06T18:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to view in drawing:</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/5829639#M144274</link>
      <description>&lt;P&gt;Thanks Sanjay,&lt;/P&gt;&lt;P&gt;i was stuck at this stage while attempting drawingview.camera.saveasbimap. It was giving "not implemented" error; your solution has given a workaround.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2015 14:41:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/5829639#M144274</guid>
      <dc:creator>kiruba</dc:creator>
      <dc:date>2015-09-23T14:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to view in drawing:</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/14113257#M180279</link>
      <description>&lt;P&gt;The given solution works for me as well! Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2026 10:24:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/zoom-to-view-in-drawing/m-p/14113257#M180279</guid>
      <dc:creator>miechh</dc:creator>
      <dc:date>2026-05-01T10:24:06Z</dc:date>
    </item>
  </channel>
</rss>

