Exemple #1
0
        private void OutTargetListAix_Click(object sender, EventArgs e)
        {
            GloalForDelmia GFD = new GloalForDelmia();

            DStype = GFD.InitCatEnv(this);
            if (DStype.Revalue == -1)
            {
                return;
            }
            Selection Uselect     = GFD.GetIRobotMotion(this, DStype, 9, "请选择正确的产品数模作为坐标基准");
            Product   BaseProduct = null;

            if (Uselect == null && Uselect.Count < 1)
            {
                return;
            }
            BaseProduct = (Product)Uselect.Item2(1).Value;
            SPAWorkbench TheSPAWorkbench = (SPAWorkbench)DStype.CDSActiveDocument.GetWorkbench("SPAWorkbench"); // Default Get Coordxyz From Word

            try
            {
                Reference  basereference = Uselect.Item2(1).Reference;
                Measurable measurable    = TheSPAWorkbench.GetMeasurable(basereference);
                object[]   PointCoord    = new object[3];//{-99, -99, -99, -99, -99, -99, -99, -99, -99 };
                Uselect.Item2(1).GetCoordinates(PointCoord);
                measurable.GetCenter(PointCoord);
            }
            catch (Exception e1)
            {
                MessageBox.Show("发生未知错误:" + e1.Message);
            }
        }
Exemple #2
0
        private void reSelectRobotTask_Click(object sender, EventArgs e)
        {
            tagList.Clear();
            viatagList.Clear();
            processtagList.Clear();
            ProcessTaskAddress.Items.Clear();
            Pbar.Value = 0;
            Pbar.Step  = 10;
            GloalForDelmia GFD = new GloalForDelmia();

            DStype = GFD.InitCatEnv(this);
            if (DStype.Revalue == -1)
            {
                return;
            }
            this.TopMost     = false;
            this.WindowState = FormWindowState.Minimized;
            Selection Uselect   = GFD.GetIRobotMotion(this, DStype, 12, "请选择即将操作的Taglist对象");
            RobotTask robotTask = null;

            if (Uselect != null && Uselect.Count > 0)
            {
                try
                {
                    String GetName = string.Empty;
                    robotTask = (RobotTask)Uselect.Item2(1).Value;
                    GetName   = robotTask.get_Name();
                    selectedrobotTaskName.Text = GetName;
                    //GFD.ClearRobotHomeList(this, DStype, Usp, "Test", Pbar);
                    GFD.ReadTaskTagList(this, robotTask, TaskListA, TaskListB, Pbar, ref tagList, ref viatagList, ref processtagList);
                }
                catch
                {
                    MessageBox.Show("操作目标过程中发生未知错误,编号:0029874,在入口的帮助选项卡中反馈该问题!");
                }
            }
            //this.TopMost = true;
            //this.WindowState = FormWindowState.Maximized;
            this.WindowState   = FormWindowState.Normal;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.TopMost       = false;
        }
Exemple #3
0
        private void ProcessTaskAddress_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (robotTasks.Count < 1)
            {
                return;
            }
            String    GetName     = string.Empty;
            int       SelectIndex = ProcessTaskAddress.SelectedIndex;
            RobotTask srobotTask  = robotTasks[SelectIndex];

            GetName = srobotTask.get_Name();
            //selectedrobotTaskName.Text = GetName;
            //GFD.ClearRobotHomeList(this, DStype, Usp, "Test", Pbar);
            GloalForDelmia GFD = new GloalForDelmia();

            DStype = GFD.InitCatEnv(this);
            GFD.ReadTaskTagList(this, srobotTask, TaskListA, TaskListB, Pbar, ref tagList, ref viatagList, ref processtagList);
            this.WindowState   = FormWindowState.Normal;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.TopMost       = true;
        }