public void DescLayerLines() { Document doc = Application.DocumentManager.MdiActiveDocument; Editor ed = doc.Editor; List <Datas> list = Select.Lines(); if (list != null) { foreach (Datas x in list) { Mleader.Create(x.Position, x.Content); } ed.WriteMessage("\n" + list.Count + " Mleaders created."); } else { ed.WriteMessage("\nNo lines found!"); } }
public void DescLayerLines() { Document doc = Application.DocumentManager.MdiActiveDocument; Editor ed = doc.Editor; string version = Acversion.FindAutoCAD(); if (version != null) { if (version.Contains("Plant 3D")) { ed.WriteMessage("\nFunction Mleader pipes loaded. Type->Command1"); } else { ed.WriteMessage("\nFunction Mleader runs only in Autocad Plant3D"); return; } } List <Datas> list = Select.Pipes(); if (list != null) { foreach (Datas x in list) { Mleader.Create(x.Position, x.Content); } ed.WriteMessage("\n" + list.Count + " Mleaders created."); } else { ed.WriteMessage("\nNo Pipes found!"); } }