public static void SpTop(Entity ent) { Autocad.Init(); var sset = SSGet(); var table = new Specification(); Action <BlockReference> ProcessBref = null; ProcessBref = (bref) => { List <BlockReference> innerBlocks = new List <BlockReference>(); Record r = GetContent(bref, innerBlocks); if (r["block_name"].StringValue.StartsWith("__")) { table.Add(r); return; } if (!r["block_name"].StringValue.StartsWith("_")) { table.Add(r); } foreach (BlockReference b in innerBlocks) { ProcessBref(b); } }; SSForeach <BlockReference>(sset, ProcessBref); var report = new DwgTableReport(table); report.Save(); Ed.WriteMessage("OK"); }
public static void SpAllF(Entity ent) { Autocad.Init(); var sset = SSGet(); var spec = new Specification(); Action <BlockReference> ProcessBref = null; ProcessBref = (bref) => { List <BlockReference> innerBlocks = new List <BlockReference>(); Record r = GetContent(bref, innerBlocks); if (!r["block_name"].StringValue.StartsWith("_") && !r["art"].StringValue.StartsWith("REF")) { spec.Add(r); } foreach (BlockReference b in innerBlocks) { ProcessBref(b); } }; SSForeach <BlockReference>(sset, ProcessBref); var report = new CsvReport(spec); report.Save(); Ed.WriteMessage("OK"); }