Beispiel #1
0
        /// <summary>
        /// Handles the OnCloseDocument event by attempting to reconnect to the Assembly Document.
        /// </summary>
        /// <param name="DocumentObject"></param>
        /// <param name="FullDocumentName"></param>
        /// <param name="BeforeOrAfter"></param>
        /// <param name="Context"></param>
        /// <param name="HandlingCode"></param>
        public static void ApplicationEvents_OnCloseDocument(Inventor._Document DocumentObject, string FullDocumentName, Inventor.EventTimingEnum BeforeOrAfter, Inventor.NameValueMap Context, out Inventor.HandlingCodeEnum HandlingCode)
        {
            HandlingCode = Inventor.HandlingCodeEnum.kEventHandled;

            if (ASSEMBLY_DOCUMENT.RevisionId == DocumentObject.RevisionId)
            {
                MAINWINDOW.BeginInvoke(new Action(RequestConnection));
            }
        }
Beispiel #2
0
 private void UserInputEvents_OnDoubleClick(Inventor.ObjectsEnumerator SelectedEntities, Inventor.SelectionDeviceEnum SelectionDevice, Inventor.MouseButtonEnum Button, Inventor.ShiftStateEnum ShiftKeys, Inventor.Point ModelPosition, Inventor.Point2d ViewPosition, Inventor.View View, Inventor.NameValueMap AdditionalInfo, out Inventor.HandlingCodeEnum HandlingCode)
 {
     HandlingCode = Inventor.HandlingCodeEnum.kEventHandled;
     //MessageBox.Show("On Double Click");
 }
Beispiel #3
0
        /// <summary>
        /// Handles the OnQuit event by attempting to reconnect to Inventor and then attempting to reconnect to the Assembly.
        /// </summary>
        /// <param name="BeforeOrAfter"></param>
        /// <param name="Context"></param>
        /// <param name="HandlingCode"></param>
        public static void ApplicationEvents_OnQuit(Inventor.EventTimingEnum BeforeOrAfter, Inventor.NameValueMap Context, out Inventor.HandlingCodeEnum HandlingCode)
        {
            HandlingCode = Inventor.HandlingCodeEnum.kEventHandled;

            MAINWINDOW.BeginInvoke(new Action(RequestConnection));
        }