I want to suppress this Save popup.
I've written a C# WPF app (.NET6.0).
I've tried this way, but the Event never fires !
And yes, the "Embed Interop Types" set to NO on the Autodesk.Inventor.Interop reference.
_inventordataService.invApp.ApplicationEvents.OnSaveDocument += AppEvents_OnSaveDocument;
private void AppEvents_OnSaveDocument(_Document DocumentObject, EventTimingEnum BeforeOrAfter, NameValueMap Context, out HandlingCodeEnum HandlingCode)
{
HandlingCode = Inventor.HandlingCodeEnum.kEventHandled;
}
Kind Regards
Johan
Solved! Go to Solution.
Solved by mowag. Go to Solution.
Solved by Ralf_Krieg. Go to Solution.
Hello
Does this happen when user clicks save button, when closing unsaved document or when your program save? When your program saves, try using the Save2 method and set the SaveDependents option to true/false.
I'm not familiar with syntax creating event handler in C#, so I can't help this point. But only set HandlingCode will probably cause inconsistent data.
Hi, R.Krieg
Yep, that did the trick; Thanks for the help !
Kind Regards
Johan
Can't find what you're looking for? Ask the community or share your knowledge.