//------------------------------------------------------------------------------ // Constructor //------------------------------------------------------------------------------ public Program() { try { theSession = Session.GetSession(); theUI = UI.GetUI(); theUFSession = UFSession.GetUFSession(); isDisposeCalled = false; } catch (NXOpen.NXException ex) { // ---- Enter your exception handling code here ----- UI.GetUI().NXMessageBox.Show("Message", NXMessageBox.DialogType.Error, ex.Message); } }