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)); } }
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); }