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: 

save menu question - add-in??

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
324 Views, 3 Replies

save menu question - add-in??

HI everyone!

 

When i aply the following save code:

 

- oapp.Documents.Item(i).Save()

 

If i have a assembly document opened when this code runs, is there any possiblity to answer the save menu questions( please see menu i'm talking about in the attached file). with code?

 

i mean save the assembly document and all it's dependent's without showing the save menu.

 

thanks.

 

 

 

 

3 REPLIES 3
Message 2 of 4
YuhanZhang
in reply to: Anonymous

You can use the SilentOperation to suppress Inventor dialogs.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

Message 3 of 4
Anonymous
in reply to: YuhanZhang

Hi!

 

I never heard about this SilentOperation what so you mean by SilentOperation? can you give me a sample code on how to apply this?

 

I have applyed the save2 in my code, but sometimes this save2 doesn't work, for example when i'm editing a assembly.

Message 4 of 4
YuhanZhang
in reply to: Anonymous

The SilentOperation can suppress the dialog with default setting only, the Save2 can let you set the dependent documents to save, and no save dialog will pop up. But what you mean the Save2 won't work if there is an in place editing, I think this is as designed for now, but you can exit the in-place edit document, you can compare the ActiveEditDocument with the top assembly to know if you need to call the ComponentOccurrence.ExitEdit(kExitToTop) before calling Save2.

 

Hope this helps.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report