Esempio n. 1
0
        public bool Init(bool showShapes)
        {
            chkShowShapes.Checked = showShapes;

            List <string> shapes = PosShape.GetAllPosShapes();

            if (shapes.Count == 0)
            {
                return(false);
            }

            try
            {
                foreach (string name in shapes)
                {
                    m_Copies.Add((PosShape)PosShape.GetPosShape(name).Clone());
                }
            }
            catch (System.Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("Error: " + ex.Message, "RebarPos", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
                return(false);
            }

            PopulateList();

            return(true);
        }
Esempio n. 2
0
        public void CMD_DumpShapes()
        {
            Autodesk.AutoCAD.EditorInput.Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
            PromptPointResult result = ed.GetPoint("Baz noktası: ");

            if (result.Status != PromptStatus.OK)
            {
                return;
            }

            Point3d pt = result.Value;

            foreach (string name in PosShape.GetAllPosShapes())
            {
                DWGUtility.DrawShape(name, pt, 100);

                pt = pt.Add(new Vector3d(0, 120, 0));
            }
        }
Esempio n. 3
0
 public void SetShapes(string current)
 {
     SetShapes(current, PosShape.GetAllPosShapes());
 }