Пример #1
0
        public void XYZOUT()
        {
            Editor editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;

            ObjectId[] array = null;
            try
            {
                ////LicenseManager.CheckValid("FULL");
                IO2.string_6 = CommandLineQuerries.SpecifyEntitiesBySelectionOrByLayer(IO2.string_6);
                if (IO2.string_6 == "S")
                {
                    array = CommandLineQuerries.SelectPoints(true);
                }
                else if (IO2.string_6 == "L")
                {
                    IO2.string_7 = CommandLineQuerries.SpecifyLayerName(IO2.string_7);
                    if (!DBManager.ExistsLayer(IO2.string_7))
                    {
                        throw new ArgumentException("Layer does not exist.");
                    }
                    array = DBManager.GetPointsOnLayer(IO2.string_7);
                    if (array == null)
                    {
                        throw new ArgumentException("No points selected.");
                    }
                    editor.WriteMessage(Environment.NewLine + array.Length + " points selected.");
                }
                CommandLineQuerries.SpecifyFileNameForWrite(ref IO2.string_5, ref IO2.string_8, "xyz");
                IO2.string_9 = CommandLineQuerries.SpecifyDelimiter(IO2.string_9);
                IO2.int_0    = CommandLineQuerries.SpecifyColumnWidth(IO2.int_0);
                IO2.int_1    = CommandLineQuerries.SpecifyDecimalDigits(IO2.int_1);
                this.WriteXYZ(array);
            }
            catch (System.Exception ex)
            {
                editor.WriteMessage(Environment.NewLine + ex.Message + Environment.NewLine);
            }
        }