Not applicable
07-24-2018
06:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello.
I have got some unusual issue while trying to catch OnFileSaveAsDialog event in Inventor 2019.
My simple program should just show its own message box before FileSaveAsDialog.
public class StandardAddInServer : Inventor.ApplicationAddInServer { private Inventor.Application m_inventorApplication;
public void Activate(Inventor.ApplicationAddInSite addInSiteObject, bool firstTime) { m_inventorApplication = addInSiteObject.Application; (breakpoint) m_inventorApplication.FileUIEvents.OnFileSaveAsDialog += FileUIEvents_OnFileSaveAsDialog; } private void FileUIEvents_OnFileSaveAsDialog(ref string[] FileTypes, bool SaveCopyAs, int ParentHWND, out string FileName, NameValueMap Context, out HandlingCodeEnum HandlingCode) { FileName = ""; HandlingCode = HandlingCodeEnum.kEventNotHandled; MessageBox.Show("Hello World!"); }
... }
While debugging, my message box is shown only if I set breakpoint (see code above). The same code does not work without setting breakpoint.
In release mode, my plugin works only if it had been loaded manually, but not automatically.
P.S. This post didn`t help me: https://forums.autodesk.com/t5/inventor-customization/onfilesaveasdialog-event-won-t-fire/m-p/371748...
Solved! Go to Solution.
Link copied