Inventor 2022 OnFileSaveAsDialog Event

julian_sol
Contributor
Contributor

Inventor 2022 OnFileSaveAsDialog Event

julian_sol
Contributor
Contributor

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:

 

SaveScreen.png

Did the OnFileSaveAsDialog event change? How can I capture this command in the new version?

0 Likes
Reply
Accepted solutions (1)
1,056 Views
11 Replies
Replies (11)

Ralf_Krieg
Advisor
Advisor

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?


R. Krieg
RKW Solutions GmbH
www.rkw-solutions.com
0 Likes

julian_sol
Contributor
Contributor

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!

0 Likes

Ralf_Krieg
Advisor
Advisor

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.

 

 


R. Krieg
RKW Solutions GmbH
www.rkw-solutions.com
0 Likes

bradeneuropeArthur
Mentor
Mentor

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 !

0 Likes

julian_sol
Contributor
Contributor
Accepted solution

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. 

Ralf_Krieg
Advisor
Advisor

Hello

 

Maybe an interesting article

https://knowledge.autodesk.com/support/vault-products/learn-explore/caas/CloudHelp/cloudhelp/2020/EN...


R. Krieg
RKW Solutions GmbH
www.rkw-solutions.com

julian_sol
Contributor
Contributor

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!

0 Likes

wood.isbell
Enthusiast
Enthusiast

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.

0 Likes

wood.isbell
Enthusiast
Enthusiast

Forget that. I forgot to set the new DLL as Embed Interop Types = False.

bor_ani
Participant
Participant

Thanks man, you saved me.

0 Likes

amriSWAA3
Participant
Participant

This fixed my issue. Thanks @wood.isbell 

0 Likes