private bool GetPolyHeight() { try { using (var tr = _TransMan.StartTransaction()) { Entity ent = (Entity)tr.GetObject(Polygon, OpenMode.ForRead); Polyline pl = ent as Polyline; if (pl != null) { _Height = pl.Elevation; return(true); } Polyline2d pl2 = ent as Polyline2d; if (pl2 != null) { _Height = pl2.GetElevation(); return(true); } Polyline3d pl3 = ent as Polyline3d; if (pl3 != null) { _Height = pl3.GetElevation(); return(true); } tr.Commit(); } } catch (Exception ex) { log.Error(ex.Message, ex); } return(false); }