示例#1
0
        public List <Polyline> FindPolylineInLayer(string layer)
        {
            var btr    = (BlockTableRecord)IdBtr.GetObject(OpenMode.ForRead);
            var allPls = btr.GetObjects <Polyline>(OpenMode.ForRead);
            var pls    = allPls.Where(p => p.Visible && p.Layer.Equals(layer, StringComparison.OrdinalIgnoreCase)).ToList();

            return(pls);
        }
 public void ReplaceAssociateHatch()
 {
     if (_hatchsAssociatedIdsDictInFacade != null)
     {
         var btr = IdBtr.GetObject(OpenMode.ForWrite) as BlockTableRecord;
         foreach (var itemDict in _hatchsAssociatedIdsDictInFacade)
         {
             var hErase = itemDict.Key.GetObject(OpenMode.ForWrite, false, true) as Hatch;
             hErase.Erase();
             itemDict.Value.CreateNewHatch(btr);
         }
         btr.UpdateAnonymousBlocks();
     }
 }