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: 

OnFileSaveAsDialog Event Not Being Caught After API Upgrade

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
etckerry
549 Views, 5 Replies

OnFileSaveAsDialog Event Not Being Caught After API Upgrade

Hello all,

 

I found that the add-in we've been maintaining for the last 10+ years was still referencing Autodesk.Inventor.Interop.dll v16.0. I tried updating it to v24.2, and while everything compiles just fine, the OnFileSaveAsDialog event is not longer being caught. Other events (document save, document open, document initialize, etc.) all seem to be fine. I tried using several other API versions, going all the way back to 17.0 and they all appear to have this issue.

 

Some other posts reporting similar issues:

https://forums.autodesk.com/t5/inventor-customization/inventor-2022-onfilesaveasdialog-event/m-p/103...

https://forums.autodesk.com/t5/inventor-customization/onfilesaveasdialog-event-problem/m-p/8151528

 

I'm using Inventor 2020 and VB.NET.

 

Based on the first link above, I thought I might try disabling all of the additional add-ins. This didn't fix the issue. Other than the add-in I develop, no other 3rd party add-ins are installed anyway.

 

My symptoms were a little different than the second link above (the add-in loads on startup automatically just fine), but I tried updating the GUID as a long shot. No change.

 

Any ideas?

 

Thanks,

 

Kerry

Labels (2)
5 REPLIES 5
Message 2 of 6

can you upload the vb.net project with the  add-in?

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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 !

Message 3 of 6

It took a bit to thin it out, but the attached project does demonstrate the issue. To reproduce:

1. Create new file -> observe message box for "OnActivate" appear twice

2. Click save -> expect message box for "OnFileSaveAsDialog" but instead get standard save as dialog

 

Thanks,

 

Kerry

Message 4 of 6
etckerry
in reply to: etckerry

After some experimenting, I was able to determine the cause of my issue, although I still don't understand why. In case it helps anyone, I had to switch the "Embed Interop Types" option to "False" for the autodesk.inventor.interop reference.

 

This is done by expanding "References" under the relevant project in the Solution Explorer pane, then selecting "autodesk.inventor.interop." In the Properties pane (if not docked, right-click on "autodesk.inventor.interop" and choose "Properties"), switch "Embed Interop  Types" to "False."

 

-Kerry

Message 5 of 6
wood.isbell
in reply to: etckerry

Thanks for this! I feel like an idiot because I have run into this in the past when moving to a more recent API version. Much hair pulling averted by your follow-up.

Message 6 of 6
davide_orlando
in reply to: etckerry

Thank you so much @etckerry! you have resolve very stranger issue fo r mee too!

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

Post to forums  

Autodesk Design & Make Report