VBA ActiveView​port Resets Zoom

VBA ActiveView​port Resets Zoom

Anonymous
Not applicable
432 Views
0 Replies
Message 1 of 1

VBA ActiveView​port Resets Zoom

Anonymous
Not applicable

I am writing a VBA application that splits the single view into 2 vertical views and in the process saves the view (zoom level) from the original single view and restores that view (zoom level)  in the left viewport.  The problem I have is when I set ThisDrawing.ActiveViewport = LeftViewPort AutoCad resets the view (zoom level) in that viewport when I just want it to stay at the view (zoom level) it was already at.

 

Currently I am getting around this issue by saving the view from the single viewport and then restoring that view in the left viewport after it is active.  However, this does not work when I have 2 saved views and want to restore 1 view in the left viewport and another view in the right viewport.

 

Also, I have tried adding

 

SendKeys "^r", true

 

to switch viewports but it is not working for some reason.

 

Any help is appreciated.

0 Likes
433 Views
0 Replies
Replies (0)