AUTO ZOOM TO FIT ON DRAWING PAGES?

AUTO ZOOM TO FIT ON DRAWING PAGES?

Preston_Reed
Advocate Advocate
2,488 Views
4 Replies
Message 1 of 5

AUTO ZOOM TO FIT ON DRAWING PAGES?

Preston_Reed
Advocate
Advocate

Is there a way to auto fit the view in inventor drawings.  The way to fit to page currently is to double click the scroll wheel.  The issue is that after you zoom in on one of your pages the next time you come back to that page it is still zoomed in unless you double click and reset it.  Is there a way that you can fit all to page at once or better yet after you leave the page it resets to a zoom to fit view.  Similar to how you can lock a view while modeling so every time you come back to that view it is set where you locked it?  

0 Likes
Accepted solutions (2)
2,489 Views
4 Replies
Replies (4)
Message 2 of 5

gcoombridge
Advisor
Advisor
Accepted solution

@Preston_Reed you can set a simple iLogic rule and run it from an event trigger (after open document). This will work in all environments (part, drawing and assembly). Here is the code:

Dim oCam As Camera
oCam = ThisApplication.ActiveView.Camera
oCam.Fit
oCam.ApplyWithoutTransition

image.png

Use iLogic Copy? Please consider voting for this long overdue idea (not mine):https://forums.autodesk.com/t5/inventor-ideas/string-replace-for-ilogic-design-copy/idi-p/3821399
Message 3 of 5

Gabriel_Watson
Mentor
Mentor
Accepted solution
This code executes a "zoom all" for all sheets in a drawing, if that helps you:
https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/ilogic-zoom-fit-all-idw-sheets/m-p/6593...
Message 4 of 5

Preston_Reed
Advocate
Advocate

Yall are great, I set it up right now for testing to trigger when I save the document.  I havent had any issues yet, thank you for the help. 

 

PREED7QR59_0-1639153361324.pngPREED7QR59_1-1639153407488.png

 

Message 5 of 5

pcrawley
Advisor
Advisor

I've been looking for this too - thanks.

 

@Preston_Reed - be careful with triggering "After Save" because it dirties the file after you save it - and you are saving the "un-zoomed" version.  

Probably safer to use "Before Save" - especially if you are a Vault user.

Peter
0 Likes