Example #1
0
        public static ClosedElement createClosedElement()
        {
            Application app = Utilities.ComApp;

            Point3d[] pntArray = new Point3d[4];
            pntArray[0] = app.Point3dFromXY(20, -6);
            pntArray[1] = app.Point3dFromXY(20, 0);
            pntArray[2] = app.Point3dFromXY(30, 0);
            pntArray[3] = app.Point3dFromXY(30, -6);

            Element outerShape = app.CreateShapeElement1(null, ref pntArray, MsdFillMode.NotFilled);

            ClosedElement closedOuterShape = outerShape as ClosedElement;

            return(closedOuterShape);
        }
Example #2
0
        public static void GroupedHoleHatched()
        {
            Application app = Bentley.MicroStation.InteropServices.Utilities.ComApp;

            ClosedElement closedOuterShape = createClosedElement();
            Element       outerShape       = closedOuterShape as Element;
            Point3d       p    = app.Point3dFromXY(0, 0);
            CellElement   cell = null;


            Point3d[] pntArray1 = new Point3d[4];
            pntArray1[0] = app.Point3dFromXY(22, -4);
            pntArray1[1] = app.Point3dFromXY(22, -2);
            pntArray1[2] = app.Point3dFromXY(24, -2);
            pntArray1[3] = app.Point3dFromXY(24, -4);

            Element innerShape = app.CreateShapeElement1(null, ref pntArray1, MsdFillMode.NotFilled);

            Element[] innerShapes = new Element[] { innerShape };
        }