Esempio n. 1
0
        private void insertTable(Table table)
        {
            TableJig jigTable = new TableJig(table, 1, "Вставка таблицы отметок свай");

            if (ed.Drag(jigTable).Status == PromptStatus.OK)
            {
                var cs = db.CurrentSpaceId.GetObject(OpenMode.ForWrite) as BlockTableRecord;
                cs.AppendEntity(table);
                db.TransactionManager.TopTransaction.AddNewlyCreatedDBObject(table, true);
            }
        }
Esempio n. 2
0
        private void insertTable(Table table)
        {
            double   scale    = db.TileMode ? 1 / db.Cannoscale.Scale : 1;
            TableJig jigTable = new TableJig(table, scale, "Вставка спецификации кондиционеров");

            if (ed.Drag(jigTable).Status == PromptStatus.OK)
            {
                var cs = db.CurrentSpaceId.GetObject(OpenMode.ForWrite) as BlockTableRecord;
                cs.AppendEntity(table);
                db.TransactionManager.TopTransaction.AddNewlyCreatedDBObject(table, true);
            }
        }
Esempio n. 3
0
        private void insertTable([NotNull] Table table, [NotNull] Document doc)
        {
            using var t = doc.TransactionManager.StartTransaction();
            var jigTable = new TableJig(table, scale, "Вставка таблицы");

            if (doc.Editor.Drag(jigTable).Status == PromptStatus.OK)
            {
                var cs = db.CurrentSpaceId.GetObjectT <BlockTableRecord>(OpenMode.ForWrite);
                cs.AppendEntity(table);
                t.AddNewlyCreatedDBObject(table, true);
            }

            t.Commit();
        }
Esempio n. 4
0
        private void insertTable(Table table)
        {
            Database db = Doc.Database;
            Editor   ed = Doc.Editor;

            TableJig jigTable = new TableJig(table, 1 / db.Cannoscale.Scale, "Вставка таблицы");

            if (ed.Drag(jigTable).Status == PromptStatus.OK)
            {
                var cs = db.CurrentSpaceId.GetObject(OpenMode.ForWrite) as BlockTableRecord;
                cs.AppendEntity(table);
                db.TransactionManager.TopTransaction.AddNewlyCreatedDBObject(table, true);
            }
        }
Esempio n. 5
0
        private void InsertTable(Table table)
        {
            TableJig jigTable = new TableJig(table, 1 / KP_BlockSectionService.Db.Cannoscale.Scale, "Вставка таблицы блок-секций");

            if (KP_BlockSectionService.Ed.Drag(jigTable).Status == PromptStatus.OK)
            {
                using (var t = KP_BlockSectionService.Db.TransactionManager.StartTransaction())
                {
                    //table.ScaleFactors = new Scale3d(100);
                    var cs = KP_BlockSectionService.Db.CurrentSpaceId.GetObject(OpenMode.ForWrite) as BlockTableRecord;
                    cs.AppendEntity(table);
                    t.AddNewlyCreatedDBObject(table, true);
                    t.Commit();
                }
            }
        }
Esempio n. 6
0
        // вставка итоговой таблицы расхода плитки на альбом
        public void InsertTableTotalTile()
        {
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Database db  = doc.Database;
            Editor   ed  = doc.Editor;

            // подсчет итогового кол плитки
            Table table = getTable(db);

            TableJig jigTable = new TableJig(table, 100, "\nВставка итоговой таблицы плитки на альбом");

            if (ed.Drag(jigTable).Status == PromptStatus.OK)
            {
                using (var t = db.TransactionManager.StartTransaction())
                {
                    //table.ScaleFactors = new Scale3d(100);
                    var cs = db.CurrentSpaceId.GetObject(OpenMode.ForWrite) as BlockTableRecord;
                    cs.AppendEntity(table);
                    t.AddNewlyCreatedDBObject(table, true);
                    t.Commit();
                }
            }
        }