Which file is being saved?

Which file is being saved?

Anonymous
Not applicable
251 Views
0 Replies
Message 1 of 1

Which file is being saved?

Anonymous
Not applicable

Hi guys, I'm trying to figure out which file is being saved when I use the FileUIEvents.OnFileSaveAsDialog

 

this captures the SaveAs window, the code looks like this (C#)

 

 

 

private void FileUIEvents_OnFileSaveAsDialog(ref string[] FileTypes, bool SaveCopyAs, int ParentHWND, out string FileName, NameValueMap Context, out HandlingCodeEnum HandlingCode)
{
Document DocumentObject = (Inventor.Document)Context.Value["TopLevelDocument"];

FileName = DocumentObject.FullFileName;
HandlingCode = HandlingCodeEnum.kEventHandled;
}

 

 

The DocumentObject always returns the topmost document, which is the top assembly, never the part that needs to be saved

The FileName is an out string, so it is 'null' when the event is fired.

 

Anyone have an idea how to catch the actual document that triggers the event?

0 Likes
252 Views
0 Replies
Replies (0)