public DXFBlock RetrieveBlock(string _name) { DXFBlock result = null; if (_name == null) { return(null); } foreach (var block in this.FBlocks.ecEntities) { if (_name.Equals(block.EntName)) { DXFBlock dxf_block = block as DXFBlock; result = dxf_block; break; } } return(result); }
public DXFEntity CreateEntity() { DXFEntity E; switch (this.FValue) { case "ENDSEC": case "ENDTAB": case "ENDBLK": case "SEQEND": return(null); case "SECTION": E = new DXFSection(); break; case "TABLE": E = new DXFTable(); break; case "BLOCK": E = new DXFBlock(); break; case "ATTDEF": case "ATTRIB": E = new DXFAttribute(); break; case "INSERT": E = new DXFInsert(); break; case "LAYER": E = new DXFLayer(); break; case "LINE": E = new DXFLine(); break; case "CIRCLE": case "ARC": E = new DXFCircle(); break; case "ELLIPSE": E = new DXFEllipse(); break; case "LWPOLYLINE": E = new DXFLWPolyLine(); break; case "TEXT": E = new DXFText(); break; case "MTEXT": E = new DXFMText(); break; case "POLYLINE": E = new DXFPolyLine(); break; case "VERTEX": E = new DXFPositionable(); break; default: E = new DXFDummy(this.FValue); break; } E.Converter = this; return(E); }