Example #1
0
        public void Initialize()

        {
            Document doc = Autodesk.AutoCAD.ApplicationServices.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");
                }
            }
        }
Example #2
0
        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!");
            }
        }