//------------------------------- DIALOG LAUNCHING --------------------------------- // // Before invoking this application one needs to open any part/empty part in NX // because of the behavior of the blocks. // // Make sure the dlx file is in one of the following locations: // 1.) From where NX session is launched // 2.) $UGII_USER_DIR/application // 3.) For released applications, using UGII_CUSTOM_DIRECTORY_FILE is highly // recommended. This variable is set to a full directory path to a file // containing a list of root directories for all custom applications. // e.g., UGII_CUSTOM_DIRECTORY_FILE=$UGII_BASE_DIR\ugii\menus\custom_dirs.dat // // You can create the dialog using one of the following way: // // 1. Journal Replay // // 1) Replay this file through Tool->Journal->Play Menu. // // 2. USER EXIT // // 1) Create the Shared Library -- Refer "Block UI Styler programmer's guide" // 2) Invoke the Shared Library through File->Execute->NX Open menu. // //------------------------------------------------------------------------------ public static void Main() { ExportElectrode theExportElectrode = null; try { theExportElectrode = new ExportElectrode(); // The following method shows the dialog immediately theExportElectrode.Show(); } catch (Exception ex) { //---- Enter your exception handling code here ----- theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString()); } finally { if (theExportElectrode != null) { theExportElectrode.Dispose(); } theExportElectrode = null; } }
public static int Main(string[] args) { #region 公共工具 if (args[0] == "MENU_MoveObject") { MoveObject move = new MoveObject(); move.Show(); } if (args[0] == "MENU_MoveObjectMin") { MoveObjectOfCenter move = new MoveObjectOfCenter("MENU_MoveObjectMin"); move.Create(); } if (args[0] == "MENU_MoveObjectMax") { MoveObjectOfCenter move = new MoveObjectOfCenter("MENU_MoveObjectMax"); move.Create(); } if (args[0] == "MENU_MoveObjectRotateX") { MoveObjectOfCenter move = new MoveObjectOfCenter("MENU_MoveObjectRotateX"); move.Create(); } if (args[0] == "MENU_MoveObjectRotateY") { MoveObjectOfCenter move = new MoveObjectOfCenter("MENU_MoveObjectRotateY"); move.Create(); } if (args[0] == "MENU_MoveObjectRotateZ") { MoveObjectOfCenter move = new MoveObjectOfCenter("MENU_MoveObjectRotateZ"); move.Create(); } #endregion #region 电极设计 if (args[0] == "MENU_SuperBox") { SuperBox superBox = new SuperBox(); superBox.Show(); } if (args[0] == "MENU_AnalyzeBodyAndFace") { AnalyzeBodyAndFace analyze = new AnalyzeBodyAndFace(); analyze.Show(); } if (args[0] == "MENU_AddEdmAsm") { AddEdmAsm add = new AddEdmAsm(); add.Show(); } if (args[0] == "MENU_AddWork") { AddWork add = new AddWork(); add.Show(); } if (args[0] == "MENU_EleStandardSeatZ+") { EleStandardSeatCreateForm form = new EleStandardSeatCreateForm("Z+"); form.Show(); } if (args[0] == "MENU_EleStandardSeatX+") { EleStandardSeatCreateForm form = new EleStandardSeatCreateForm("X-"); form.Show(); } if (args[0] == "MENU_EleStandardSeatY+") { EleStandardSeatCreateForm form = new EleStandardSeatCreateForm("Y+"); form.Show(); } if (args[0] == "MENU_EleStandardSeatX-") { EleStandardSeatCreateForm form = new EleStandardSeatCreateForm("X+"); form.Show(); } if (args[0] == "MENU_EleStandardSeatY-") { EleStandardSeatCreateForm form = new EleStandardSeatCreateForm("Y-"); form.Show(); } if (args[0] == "MENU_DeleteEle") { DeleteEle delete = new DeleteEle(); delete.Show(); } if (args[0] == "MENU_PositionEle") { PositionEle posit = new PositionEle(); posit.Show(); } if (args[0] == "MENU_Interference") { Interference inter = new Interference(); inter.Show(); } if (args[0] == "MENU_WorkpieceDrawing") { new WorkpieceDrawingCreateForm().Show(); } if (args[0] == "MENU_ElectrodeDrawing") { new ElectrodeDrawingCreateForm().Show(); } if (args[0] == "MENU_AlterEleName") { new AlterEleName().Show(); } if (args[0] == "MENU_CopyAsm") { new CopyAsm().Show(); } if (args[0] == "MENU_Bom") { new BomCreateForm().Show(); } #endregion // test.ces(); if (args[0] == "MENU_EleProgram") { EleProgram mode = new EleProgram(); mode.Show(); } if (args[0] == "MENU_Program") { CrateUserDefinedOperation.Create(); } if (args[0] == "MENU_ExportElectrode") { ExportElectrode ele = new ExportElectrode(); ele.Show(); } if (args[0] == "MENU_AddProgram") { AddProgram ele = new AddProgram(); ele.Show(); } if (args[0] == "MENU_PostShopdoc") { PostShopdocCreateForm.Show(); } return(1); }