예제 #1
0
        public static ODBuilding GetRecord(BlockBase block, ObjectId idEntBuilding, BuildingType type, double height)
        {
            var        IdPlContourInModel = block.CopyEntToModel(idEntBuilding.Database.CurrentSpaceId, idEntBuilding);
            ODBuilding od = new ODBuilding(IdPlContourInModel, type, height);

            return(od);
        }
예제 #2
0
        public static List <ODCoverage> GetRecords(BlockBase block, string layer, CoverageType type)
        {
            List <ODCoverage> recs = new List <ODCoverage>();
            var btr         = block.IdBtr.GetObject(OpenMode.ForRead) as BlockTableRecord;
            var plsCoverage = btr.GetObjects <Polyline>().
                              Where(p => p.Visible && p.Layer.Equals(layer, StringComparison.OrdinalIgnoreCase));

            foreach (var item in plsCoverage)
            {
                var        idPlCoverage = block.CopyEntToModel(btr.Database.CurrentSpaceId, item.Id);
                ODCoverage odCoverage   = new ODCoverage(idPlCoverage, type);
                recs.Add(odCoverage);
            }
            return(recs);
        }