VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VBA ActiveView​port Resets Zoom

0 REPLIES 0
Reply
Message 1 of 1
dallas.akre
310 Views, 0 Replies

VBA ActiveView​port Resets Zoom

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 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost