Exemplo n.º 1
0
        public ViewportDrawingObject AddFullViewport()
        {
            ViewportDrawingObject viewport = ViewportDrawingObject.Create(_layout, Bottom, Top, Left, Right);

            _viewportGrid[0, 0] = viewport;
            return(viewport);
        }
        public static ViewportDrawingObject Create(Layout layout, double Bottom, double Top, double Left, double Right)
        {
            Transaction trans = layout.Database.TransactionManager.TopTransaction;
            Viewport    vp    = new Viewport();
            var         btr   = (BlockTableRecord)trans.GetObject(layout.BlockTableRecordId, OpenMode.ForWrite);

            btr.AppendEntity(vp);
            trans.AddNewlyCreatedDBObject(vp, true);

            ViewportDrawingObject result = new ViewportDrawingObject(vp);

            result.SetDimensions(Bottom, Top, Left, Right);
            return(result);
        }