Save window

Save window

Anonymous
Not applicable
914 Views
4 Replies
Message 1 of 5

Save window

Anonymous
Not applicable

I'm running Inventor R2011, writing a VBA to make some changes in a part or assembly model.  Upon saving an assembly, I get a "Save" window which lists the assembly and components and an option to save for each (see attached).  Is it possible to manipulate this window with VBA?  I tried running the macro with ThisApplication.SilentOperation=True, but if the default "Save" in the window is set to "No", the file doesn't save.  What is this window Object named and how do I access it?  Thanx.

0 Likes
915 Views
4 Replies
Replies (4)
Message 2 of 5

MechMachineMan
Advisor
Advisor
Can you not just use a Save or a Save2 directly before you try and close it?

--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 3 of 5

Anonymous
Not applicable

I'm calling oDoc.Save, then oDoc.Close.  I get the "Save" window when I call oDoc.Save.  I can have the drafter manually manipulate the window, but I'd rather do it with the macro.  Thanx for the reply.

0 Likes
Message 4 of 5

MechMachineMan
Advisor
Advisor

Which would be why I said "Save" or "Save2".

 

api HELP.JPG

 

AssemblyDocument.Save Method
Parent Object: AssemblyDocument
Description Saves this document to disk.
Syntax AssemblyDocument.Save()
Version Introduced in Inventor version 4

 

 

AssemblyDocument.Save2 Method

AssemblyDocument.Save2 Method

Parent Object: AssemblyDocument

Description

Method that saves the document and the specified dependent documents.

Syntax

AssemblyDocument.Save2( [SaveDependents] As Boolean, [DocumentsToSave] As Variant )

Parameters

NameDescription
SaveDependentsOptional input Boolean that specifies whether or not to save dependent documents that have been dirtied. Defaults to True indicating that the dependents will be saved. If the DependentsToSave argument is not specified, all dirty dependents are saved. If the argument is specified as False, only this document will be saved. The argument is ignored if the document doesn't have any dependents needing save.
DocumentsToSaveOptional input ObjectCollection that contains the Document objects to save. Use the Document.AllReferencedDocuments property to iterate over all dependent documents and find the ones that need to be saved (i.e. Dirty property returns True). If the SaveDependents argument is True and this argument is not specified, all dirty documents are saved. The argument is ignored if the document doesn't have any dependents needing save.

--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 5 of 5

GeorgK
Advisor
Advisor
You can set the SilentOperation = True to hide the save dialog.
ThisApplication.SilentOperation = True
But set it back to show it again.
ThisApplication.SilentOperation = False
Cheers

Georg
0 Likes