Hi,
Since I've updated to Inventor 2022 (and it's API) my OnFileSaveAsDialog Event does not trigger anymore on saving a new file. Instead I get this new save dialog:
Did the OnFileSaveAsDialog event change? How can I capture this command in the new version?
Solved! Go to Solution.
Solved by julian_sol. Go to Solution.
Hello
Afaik there's no change on this event.
How did you catch this event? VBA, iLogic, VB.Net Addin?
The Dialog looks like Vault? Have you used it also before 2022?
Thanks for your response. It is indeed the Vault Plugin that is causing this dialog to pop up.
I'm catching the event in a C# .NET plugin as below:
private Inventor.Application InventorApplication { get; set; }
private FileUIEvents FileUiEvents { get; set; }
public void Activate(Inventor.ApplicationAddInSite addInSiteObject, bool firstTime)
{
// Initialize AddIn members.
InventorApplication = addInSiteObject.Application;
FileUiEvents = InventorApplication.FileUIEvents;
FileUiEvents.OnFileSaveAsDialog += FileUiEventsOnOnFileSaveAsDialog;
}
private void FileUiEventsOnOnFileSaveAsDialog(ref string[] filetypes, bool savecopyas, int parenthwnd, out string filename, NameValueMap context, out HandlingCodeEnum handlingcode)
{
// NORMALLY I WOULD OPEN A CUSTOM WINDOW HERE
throw new NotImplementedException();
}
If I logout of Vault, the code works and the event is triggered. If I'm logged in I get the Vault dialog.
Would you know how to turn this off or skip this? Thanks!
Hello
Afaik, if two or more Addins listen to the same event, there's no possibility to define the order the Addins code run. I'm not familar with Vault. The Basic client offers no API. If it's a higher version, maybe one of the following ideas can help:
- Check if it's possible to configure Vault plugin to not listen on this event.
- Check if there's an event in Vault API open the dialog (CreateNewFileDialog) and create a handler to suppress the Vault dialog and display your own.
Vault API does not support that kind of events!
Regards,
Arthur Knoors
Autodesk Affiliations:
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !
I found what was causing the unwanted dialog to show up. It's the extra Vault Datastandard Addin. It uses the same save command ID and this apparently overwrites the standard Inventor save method.
Hello
Maybe an interesting article
Thank you, that's definitely useful. I don't think we'll need the Datastandard Addin at all, but it's good to know something exists to bypass this!
This conversation seemed relevant to an issue I am having, but I am not running the Data Standard add-in and my handler is not being called with or without being logged into Vault. I am using the same handling method, and it worked in 2020, but not in 2022.
Separately, I confirmed that it is not another add-in by disabling everything outside of my add-in; no dice.
Forget that. I forgot to set the new DLL as Embed Interop Types = False.
Can't find what you're looking for? Ask the community or share your knowledge.