public DXFLayer LayerByName(string AName) { DXFLayer Result = null; int I; if (layers == null) { layers = new DXFTable(); } for (I = 0; I < layers.Entities.Count; I++) { if (AName.ToLower() == ((DXFLayer)layers.Entities[I]).name.ToLower()) { Result = ((DXFLayer)layers.Entities[I]); } } if (Result == null) { Result = new DXFLayer(); Result.name = AName; layers.AddEntity(Result); } return(Result); }
public DXFEntity CreateEntity() { DXFEntity E; switch (FValue) { case "ENDSEC": return(null); case "ENDBLK": return(null); case "ENDTAB": return(null); case "LINE": E = new DXFLine(); break; case "SECTION": E = new DXFSection(); break; case "BLOCK": E = new DXFBlock(); break; case "INSERT": E = new DXFInsert(); break; case "TABLE": E = new DXFTable(); break; case "CIRCLE": E = new DXFCircle(); break; case "LAYER": E = new DXFLayer(); break; case "TEXT": E = new DXFText(); break; case "MTEXT": E = new DXFMText(); break; case "ARC": E = new DXFArc(); break; case "ELLIPSE": E = new DXFEllipse(); break; default: E = new DXFEntity(); break; } E.Converter = this; return(E); }