Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ilogic rule for Zoom all before Save

5 REPLIES 5
Reply
Message 1 of 6
nicomajstr
3145 Views, 5 Replies

Ilogic rule for Zoom all before Save

Hi,

is there any solution for automatic Zoom all drawing before save it?

I need this because thumbnails in explorer.

 

I found this code for rule:
ThisApplication.ActiveView.Fit

 

It works fine, but there is problem with Event Trigger - I use Before save document, but doesn't work. It zooms all, but i think after saving, because thumbnail is not zoomed.

 

Thanks for help!

5 REPLIES 5
Message 2 of 6
GosponZ
in reply to: nicomajstr

Try this:

ThisApplication.CommandManager.ControlDefinitions.Item("AppIsometricViewCmd").Execute

Message 3 of 6
nicomajstr
in reply to: GosponZ

Thanks for advice, but it doesn't work. I need this for drawing not for part.

Message 4 of 6
GosponZ
in reply to: nicomajstr

'ZOOM IN
ThisApplication.CommandManager.ControlDefinitions.Item("AppZoomallCmd").Execute
iLogicVb.UpdateWhenDone=True

Message 5 of 6
nicomajstr
in reply to: GosponZ

It works same as my first solution (it zooms, but after saving document, so thumbnail is not zoom all picture). Cat Sad

Message 6 of 6
jvaughn8XF7X
in reply to: nicomajstr

Instead of using

iLogicVb.UpdateWhenDone=True

Try

Call InventorVb.DocumentUpdate

to force the document to update immediately rather than at the end of the rule.

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

Post to forums  

Autodesk Design & Make Report