/// <summary> /// Рисуем слой /// </summary> /// <param name="wl"> слой </param> public void DrawLayer(Data.DataLayer wl) { //List<Entity> wEntlist = new List<Entity>(); Autodesk.Gis.Map.ObjectData.Table wTbl = null; if (wl.HasAttributes()) { wTbl = CreateODTable(wl._Rule); } ObjectId wid; Entity wEnt; Geometry.TGeometry g; foreach (Data.MyRecord wr in wl.Table) { g = wr.GetGeometry(); if (g != null) { wEnt = MakeGeometry(g); wid = DrawEntity(wEnt); if (wl.HasAttributes()) { AddAttr(wid, wr, wTbl); } } //wEntlist.Add(wEnt); } //DrawEntity(wEntlist); }
/// <summary>Рисуем слой</summary> /// <param name="wl"> слой </param> public void DrawLayer(Data.DataLayer wl) { if (!wl.HasGeometry()) { return; } Autodesk.Gis.Map.ObjectData.Table wTbl = null; if (wl.HasAttributes()) { wTbl = CreateOdTable(wl._Rule); } foreach (var wr in wl.Table) { var g = wr.GetGeometry(); if (g == null || g.IsEmpty() || !g.IsValid()) { continue; } if (wl.HasAttributes()) { AddAttr(DrawEntity(MakeGeometry(g)), wr, wTbl); } } }