Esempio n. 1
0
 public ACMark()
 {
     marks = new List<Handle>();
     db = Application.DocumentManager.MdiActiveDocument.Database;
     bi = new BlockManager();
     lm = new LayerManager();
 }
        private void Create_ACMark()
        {
            LayerManager lm = new LayerManager();
            string layerName = lm.GetACMarkLayerCreateIfDoesntExists();
            string blockName = "ACMark";
            DBObjectCollection entityCollection = new DBObjectCollection();
            Circle ent1 = new Circle(new Point3d(0, 0, 0), new Vector3d(0, 0, 1), 0.2);
            ent1.Layer = layerName;
            ent1.Color = Color.FromColorIndex(ColorMethod.ByColor, 1);
            entityCollection.Add(ent1);

            Line ent2 = new Line(new Point3d(-0.200, -0.200, 0), new Point3d(0.200, 0.200, 0));
            ent2.Layer = layerName;
            ent2.Color = Color.FromColorIndex(ColorMethod.ByColor, 1);
            entityCollection.Add(ent2);

            Line ent3 = new Line(new Point3d(-0.200, 0.200, 0), new Point3d(0.200, -0.200, 0));
            ent3.Layer = layerName;
            ent3.Color = Color.FromColorIndex(ColorMethod.ByColor, 1);
            entityCollection.Add(ent3);

            TryInsertBlockRecord(blockName, entityCollection);
        }
Esempio n. 3
0
        private void InitializeBWCad12(Transaction trans, short barNumber, double scale, short barAmount,
            short tierAmount, double barDiameter, double spanStep, Point3d barPoint1, Point3d barPoint2,
            Point3d spanPoint1, Point3d spanPoint2, Point3d descriptionSignPoint, double descriptionSignRotation,
            bool adaptate)
        {
            this.scale = scale;
            this.barNumber = barNumber;
            this.barAmount = barAmount;
            this.tierAmount = tierAmount;
            this.barDiameter = barDiameter;
            this.spanStep = spanStep;
            this.barPoint1 = barPoint1;
            this.barPoint2 = barPoint2;
            this.spanPoint1 = spanPoint1;
            this.spanPoint2 = spanPoint2;
            this.descriptionSignPoint = descriptionSignPoint;
            this.descriptionSignRotationDeg = descriptionSignRotation;
            this.adaptate = adaptate;

            editor = Application.DocumentManager.MdiActiveDocument.Editor;
            db = Application.DocumentManager.MdiActiveDocument.Database;
            doc = Application.DocumentManager.MdiActiveDocument;

            xDataAdder = new XDataAdderForReinfBars(barNumber, BarLength, true,
                scale, barAmount, tierAmount, spanStep, barDiameter, OperationNumber);
            bm = new BlockManager();

            lm = new LayerManager();
            this.trans = trans;
            xDataAdder = new XDataAdderForReinfBars(barNumber, BarLength, true,
                scale, barAmount, tierAmount, spanStep, barDiameter, OperationNumber);

            if (adaptate)
            {
                adaptator = new BWCadAdaptator();
            }
        }