Exemple #1
0
        public void SimplifyPolylinesCommand()
        {
            Editor   editor   = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
            Database arg_15_0 = HostApplicationServices.WorkingDatabase;

            try
            {
                //LicenseManager.CheckValid("FULL");
                ObjectId[] array = CommandLineQuerries.SelectPolylines(false);
                PLine.double_0 = CommandLineQuerries.SpecifyDouble("Specify epsilon range", PLine.double_0, false, false, false, true);
                PLine.string_2 = CommandLineQuerries.KeywordYesNo("Keep original polylines", PLine.string_2, false, false);
                int num  = 0;
                int num2 = 0;
                int num3 = 0;
                this.method_1(array, PLine.double_0, ref num, ref num2, ref num3);
                editor.WriteMessage(string.Concat(new string[]
                {
                    "\nNumber of vertices before    : ",
                    num.ToString(),
                    "\nNumber of vertices after     : ",
                    num2.ToString(),
                    "\nNumber of polylines processed: ",
                    array.Length.ToString(),
                    "\nNumber of polylines failed   : ",
                    num3.ToString()
                }));
            }
            catch (System.Exception ex)
            {
                editor.WriteMessage(Environment.NewLine + ex.Message + Environment.NewLine);
            }
        }