public void InsertAlimentador() { Editor ed = Application.DocumentManager.MdiActiveDocument.Editor; AlimentadorContent fullContent = AutoCADUtils.GetAlimentadorFromJSON(); AutoCADUtils.VoidTransaction((Document doc, Transaction tr) => { if (fullContent != null && fullContent.Lineas.Length > 0) { var saver = new FormatSaver(fullContent.Lineas); saver.Save(doc, tr); } }); if (fullContent != null) { List <AlimentadorContent> contentByPages = AlimentadorContent.FixContentByPages(fullContent); foreach (var content in contentByPages) { AutoCADUtils.VoidTransaction((Document doc, Transaction tr) => { var res = ed.GetPoint("Selecciona el punto de inserción de la tabla"); if (res.Status == PromptStatus.OK) { AlimTable table = new AlimTable(res.Value, content); table.Init(); table.Insert(doc, tr); } }); ed.Regen(); } } }
public void InsertVerticalLines() { Editor ed = Application.DocumentManager.MdiActiveDocument.Editor; AutoCADUtils.VoidTransaction((Document doc, Transaction tr) => { FormatSaver sav = new FormatSaver(); sav.InsertVerticalTags(doc, tr); }); ed.Regen(); }