<?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: problem set active viewport when splited in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/problem-set-active-viewport-when-splited/m-p/1846776#M28996</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
Do you have a solution on this problem? &lt;BR /&gt;
&lt;BR /&gt;
Thank you,&lt;BR /&gt;
Cata</description>
    <pubDate>Wed, 20 Feb 2008 20:55:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-02-20T20:55:19Z</dc:date>
    <item>
      <title>problem set active viewport when splited</title>
      <link>https://forums.autodesk.com/t5/vba-forum/problem-set-active-viewport-when-splited/m-p/1846772#M28992</link>
      <description>I want zoom splited viewports in model space with different's directions (top, front...), center and magnitudes. But,  when I change the current viewport, all the others lost the zoom I had set. &lt;BR /&gt;
...&lt;BR /&gt;
For Each vport In ThisDrawing.Viewports&lt;BR /&gt;
    ThisDrawing.ActiveViewport = vport 'here the others lost the zoom I had set&lt;BR /&gt;
...&lt;BR /&gt;
When I alter the current viewport manually, clicking in the viewports, it's not occurs.&lt;BR /&gt;
I see others topics describing the same problem, but no reply, then I'm trying to change the current viewport by 'sendcommand'. Any help to do this?&lt;BR /&gt;
&lt;BR /&gt;
thanks</description>
      <pubDate>Wed, 20 Dec 2006 11:47:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/problem-set-active-viewport-when-splited/m-p/1846772#M28992</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-12-20T11:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: problem set active viewport when splited</title>
      <link>https://forums.autodesk.com/t5/vba-forum/problem-set-active-viewport-when-splited/m-p/1846773#M28993</link>
      <description>would you post the routine please.</description>
      <pubDate>Wed, 20 Dec 2006 18:45:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/problem-set-active-viewport-when-splited/m-p/1846773#M28993</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-12-20T18:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: problem set active viewport when splited</title>
      <link>https://forums.autodesk.com/t5/vba-forum/problem-set-active-viewport-when-splited/m-p/1846774#M28994</link>
      <description>Sub VportsUpdate()    &lt;BR /&gt;
    Dim vport As AcadViewport&lt;BR /&gt;
    Dim dirTop(0 To 2) As Double&lt;BR /&gt;
    Dim dirFront(0 To 2) As Double&lt;BR /&gt;
    &lt;BR /&gt;
   'draw a circle in origin&lt;BR /&gt;
    ThisDrawing.ModelSpace.AddCircle dirTop, 10&lt;BR /&gt;
&lt;BR /&gt;
   'if not splited, split the viewport&lt;BR /&gt;
    If ThisDrawing.Viewports.Count = 1 Then&lt;BR /&gt;
        ThisDrawing.ActiveViewport.Split acViewport2Horizontal&lt;BR /&gt;
        ThisDrawing.Regen acAllViewports&lt;BR /&gt;
        VportsUpdate&lt;BR /&gt;
    End If&lt;BR /&gt;
    'here is the code        &lt;BR /&gt;
    For Each vport In ThisDrawing.Viewports&lt;BR /&gt;
        ThisDrawing.ActiveViewport = vport&lt;BR /&gt;
        If vport.UpperRightCorner(1) = 0 Then vport.Direction = dirTop&lt;BR /&gt;
        If vport.UpperRightCorner(1) = 0.5 Then vport.Direction = dirFront&lt;BR /&gt;
        ThisDrawing.Application.ZoomExtents&lt;BR /&gt;
    Next vport&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
If you stop the execution in the 'Next vport' line, you can see the good result in the Acad window... but after the next 'thisdrawing.activeviewport = vport', the zoomextend is missed.</description>
      <pubDate>Wed, 20 Dec 2006 19:20:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/problem-set-active-viewport-when-splited/m-p/1846774#M28994</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-12-20T19:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: problem set active viewport when splited</title>
      <link>https://forums.autodesk.com/t5/vba-forum/problem-set-active-viewport-when-splited/m-p/1846775#M28995</link>
      <description>sorry, in the code paste I forgot initialize the dirTop and dirFront after draw the circle.&lt;BR /&gt;
&lt;BR /&gt;
    dirTop(0) = 0: dirTop(1) = 0: dirTop(2) = 1&lt;BR /&gt;
    dirFront(0) = 0: dirFront(1) = -1: dirFront(2) = 0</description>
      <pubDate>Wed, 20 Dec 2006 19:22:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/problem-set-active-viewport-when-splited/m-p/1846775#M28995</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-12-20T19:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: problem set active viewport when splited</title>
      <link>https://forums.autodesk.com/t5/vba-forum/problem-set-active-viewport-when-splited/m-p/1846776#M28996</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
Do you have a solution on this problem? &lt;BR /&gt;
&lt;BR /&gt;
Thank you,&lt;BR /&gt;
Cata</description>
      <pubDate>Wed, 20 Feb 2008 20:55:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/problem-set-active-viewport-when-splited/m-p/1846776#M28996</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-02-20T20:55:19Z</dc:date>
    </item>
  </channel>
</rss>

