示例#1
0
 /**
  *   Main method
  */
 public static void Main()
 {
     try
     {
         CustomMenuCreator menuCreator = GetInstance();
         menuCreator.RegisterCallbacks();
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         m_UI.NXMessageBox.Show("CustomMenuCreator", NXOpen.NXMessageBox.DialogType.Information, ex.Message);
     }
 }
示例#2
0
        /**
         *  Startup
         *  Entrypoint used when program is loaded automatically
         *  as NX starts up. Note this application must be placed in a
         *  special folder for NX to find and load it during startup.
         *  Refer to the NX Open documentation for more details on how
         *  NX finds and loads applications during startup.
         */
        public static int Startup()
        {
            int retValue = 0;

            try
            {
                CustomMenuCreator menuCreator = GetInstance();
                menuCreator.RegisterCallbacks();
            }
            catch (NXOpen.NXException ex)
            {
                // ---- Enter your exception handling code here -----
                UI.GetUI().NXMessageBox.Show("Caught exception",
                                             NXMessageBox.DialogType.Error, ex.Message);
            }
            return(retValue);
        }