コード例 #1
0
ファイル: SlopeCommand.cs プロジェクト: 15831944/Geo7
        protected override void ExecuteCore()
        {
            this.DisplayErrormMessageBox = false;
            this.DimStyleId = AcDwgDb.ImportMissedDimStyle("G7-Slope", Geo7App.Geo7Dwg);

            do
            {
                PromptPointResult ptRes = Ac.Editor.GetPoint("\r\n" + AppServices.Strings.EnterStartPoint);
                if (!ptRes.IsOK())
                {
                    return;
                }
                var startPnt = ptRes.Value;

                var epPrtOpts = Ac.Editor.GetPromptPointOptions("\r\n" + AppServices.Strings.EnterEndPoint, startPnt, true);
                ptRes = Ac.Editor.GetPoint(epPrtOpts);
                if (!ptRes.IsOK())
                {
                    return;
                }

                var endPnt = ptRes.Value;

                AddSlope(startPnt, endPnt);
            } while (true);
        }
コード例 #2
0
        protected override void ExecuteCore()
        {
            this.DisplayErrormMessageBox = false;
            this.DimStyleId = AcDwgDb.ImportMissedDimStyle("G7-Diff", Geo7App.Geo7Dwg);

            LineId = Ac.Editor.GetPolyline("\r\n" + AppServices.Strings.SelectLine + ": ");

            if (LineId.IsValid)
            {
                Ac.WriteLn(AppServices.Strings.SelectBlock);
                var selWnd = new BlockSelectWindow(OnBlocksSelected);
                Ac.ShowModal(selWnd);
            }
        }