Message 1 of 2
Dialog on OnSaveDocument

Not applicable
01-31-2013
03:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I try to open a Form that i create in the OnSaveDocument Event. I tested the Event with some MessageBox, they show up succesfully.
The Problem, My Form does not show on Screen.
Private Sub m_appEvents_OnSaveDocument(ByVal DocumentObject As Inventor.Document, ByVal BeforeOrAfter As Inventor.EventTimingEnum, ByVal Context As Inventor.NameValueMap, ByRef HandlingCode As Inventor.HandlingCodeEnum) _ Handles m_appEvents.OnSaveDocument If BeforeOrAfter = EventTimingEnum.kBefore Then If DocumentObject.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Or DocumentObject.DocumentType = DocumentTypeEnum.kPartDocumentObject Then CheckCustomiProperty(DocumentObject, "Name englisch", "") CheckCustomiProperty(DocumentObject, "BENKEY", "") Dim oUDProps As PropertySet oUDProps = DocumentObject.PropertySets.Item(4) Dim oProps As PropertySet oProps = DocumentObject.PropertySets.Item(3) If oUDProps.Item("Name englisch").Value = "" MsgBox(oUDProps.Item("Name englisch").Value) MsgBox(oUDProps.Item("BENKEY").Value) MsgBox(oProps.Item(2).Value) MyForm.Show() MyForm.TopMost = True End If End If End If End Sub
The Important Part is:
'WORKS MsgBox(oUDProps.Item("Name englisch").Value) MsgBox(oUDProps.Item("BENKEY").Value) MsgBox(oProps.Item(2).Value) 'DONT WORK MyForm.Show() MyForm.TopMost = True
Thank you for your help, is it possible to show the Dialog ?
Best Regards Mathias