Пример #1
0
 public DBObject GetDBObject()
 {
     if (!IdEnt.IsValidEx())
     {
         return(null);
     }
     return(IdEnt.GetObject(OpenMode.ForWrite, false, true));
 }
Пример #2
0
 private Rectangle GetRectangle()
 {
     if (!IdEnt.IsValidEx())
     {
         return(null);
     }
     using (var ent = IdEnt.Open(OpenMode.ForRead) as Entity)
     {
         var ext = ent.GeometricExtents;
         return(new Rectangle(ext));
     }
 }
Пример #3
0
 public override Polyline GetContourInModel()
 {
     using (var ent = IdEnt.Open(OpenMode.ForRead) as Entity)
     {
         if (ent is Polyline)
         {
             var plCopy = (Polyline)ent.Clone();
             if (plCopy.Elevation != 0)
             {
                 plCopy.Elevation = 0;
             }
             return(plCopy);
         }
         else if (ent is Hatch)
         {
             // Найти контур штриховки и перевести его в полилинию.
         }
     }
     return(null);
 }