Пример #1
0
        public void CMD_PosLength()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            PromptSelectionResult selresult = DWGUtility.SelectAllPosUser();

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

            PromptKeywordOptions opts = new PromptKeywordOptions("L boyunu [Göster/giZle]: ", "Show Hide");

            opts.AllowNone = false;
            PromptResult result = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.GetKeywords(opts);

            if (result.Status == PromptStatus.OK)
            {
                switch (result.StringResult)
                {
                case "Show":
                    ShowPosLength(selresult.Value.GetObjectIds(), true);
                    break;

                case "Hide":
                    ShowPosLength(selresult.Value.GetObjectIds(), false);
                    break;
                }
            }
        }
Пример #2
0
        public void CMD_IncludePos()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            PromptSelectionResult selresult = DWGUtility.SelectAllPosUser();

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

            PromptKeywordOptions opts = new PromptKeywordOptions("Metraja [Dahil et/metrajdan Cikar]: ", "Add Remove");

            opts.AllowNone = false;
            PromptResult result = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.GetKeywords(opts);

            if (result.Status == PromptStatus.OK)
            {
                switch (result.StringResult)
                {
                case "Add":
                    IcludePosinBOQ(selresult.Value.GetObjectIds(), true);
                    break;

                case "Remove":
                    IcludePosinBOQ(selresult.Value.GetObjectIds(), false);
                    break;
                }
            }
        }
Пример #3
0
        public void CMD_BOQEdit()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            Autodesk.AutoCAD.EditorInput.Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;

            // Edit entity if there is a pickset
            PromptSelectionResult selectionRes = ed.SelectImplied();

            if (selectionRes.Status != PromptStatus.Error && selectionRes.Value.Count > 0)
            {
                ObjectId id = selectionRes.Value[0].ObjectId;
                ed.SetImpliedSelection(new ObjectId[0]);
                ItemEdit(id, MonitoredPoint);
                return;
            }

            PromptEntityOptions opts = new PromptEntityOptions("Select entity: ");

            opts.AllowNone = false;
            PromptEntityResult result = ed.GetEntity(opts);

            if (result.Status == PromptStatus.OK)
            {
                ItemEdit(result.ObjectId, result.PickedPoint);
            }
        }
Пример #4
0
        public void CMD_TableStyle()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            TableStyles();
        }
Пример #5
0
        public void CMD_DrawBOQ()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            DrawBOQ();
        }
Пример #6
0
        public void CMD_PosUpgrade()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            PosUpgrade();
        }
Пример #7
0
        public void CMD_FindReplace()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            FindReplace(true);
        }
Пример #8
0
        public void CMD_PosShapes()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            PosShapes();
        }
Пример #9
0
        public void CMD_CopyPosDetail()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            CopyPosDetail();
        }
Пример #10
0
        public void CMD_CopyPosNumber()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            CopyPosNumber();
        }
Пример #11
0
        public void CMD_EmptyBalloons()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            EmptyBalloons();
        }
Пример #12
0
        public void CMD_NumberPos()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            NumberPos();
        }
Пример #13
0
        public void CMD_NewPos()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            NewPos();
        }
Пример #14
0
        public void CMD_PosGroups()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            PosGroups();
        }
Пример #15
0
        public void CMD_PosExplode()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            PosExplode();
        }
Пример #16
0
        public void CMD_HideShapes()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            ShowShapes = false;
            DWGUtility.RefreshAllPos();
        }
Пример #17
0
        public void CMD_ToggleShapes()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            ShowShapes = !ShowShapes;
            DWGUtility.RefreshAllPos();
        }
Пример #18
0
        public void CMD_LastPosNumber()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            PromptSelectionResult sel = DWGUtility.SelectAllPosUser();

            if (sel.Status != PromptStatus.OK)
            {
                return;
            }
            ObjectId[] items = sel.Value.GetObjectIds();

            int lastNum = GetLastPosNumber(items);

            if (lastNum != -1)
            {
                MessageBox.Show("Son poz numarası: " + lastNum.ToString(), "RebarPos", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #19
0
        public void CMD_Pos()
        {
            if (!CheckLicense.Check())
            {
                return;
            }

            Autodesk.AutoCAD.EditorInput.Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;

            // Edit entity if there is a pickset
            PromptSelectionResult selectionRes = ed.SelectImplied();

            if (selectionRes.Status != PromptStatus.Error && selectionRes.Value.Count > 0)
            {
                ObjectId id = selectionRes.Value[0].ObjectId;
                ed.SetImpliedSelection(new ObjectId[0]);
                ItemEdit(id, MonitoredPoint);
                return;
            }

            bool cont = true;

            while (cont)
            {
                PromptEntityOptions opts = new PromptEntityOptions("Poz secin veya [Yeni/Numaralandir/Kopyala/kOntrol/Metraj/bul Degistir/numara Sil/Acilimlar/Tablo stili/ayaRlar]: ",
                                                                   "New Numbering Copy Check BOQ Find Empty Shapes Table Preferences");
                opts.AllowNone = false;
                PromptEntityResult result = ed.GetEntity(opts);

                if (result.Status == PromptStatus.Keyword)
                {
                    switch (result.StringResult)
                    {
                    case "New":
                        NewPos();
                        break;

                    case "Numbering":
                        NumberPos();
                        break;

                    case "Empty":
                        EmptyBalloons();
                        break;

                    case "Copy":
                        CopyPos();
                        break;

                    case "Check":
                        PosCheck();
                        break;

                    case "BOQ":
                        DrawBOQ();
                        break;

                    case "Find":
                        FindReplace(false);
                        break;

                    case "Shapes":
                        PosShapes();
                        break;

                    case "Table":
                        TableStyles();
                        break;

                    case "Preferences":
                        PosGroups();
                        break;
                    }
                    cont = false;
                }
                else if (result.Status == PromptStatus.OK)
                {
                    ItemEdit(result.ObjectId, result.PickedPoint);
                    cont = true;
                }
                else
                {
                    cont = false;
                }
            }
        }