예제 #1
0
        /// <summary>
        /// Подписывание вершин полилинии
        /// </summary>
        public static void TestDrawVertexNumbers([NotNull] this Polyline pl, Color color)
        {
            var scale = ScaleHelper.GetCurrentAnnoScale(HostApplicationServices.WorkingDatabase);
            var texts = new List <Entity>();

            for (var i = 0; i < pl.NumberOfVertices; i++)
            {
                var text = new DBText
                {
                    TextString = i.ToString(),
                    Position   = pl.GetPoint2dAt(i).Convert3d(),
                    Height     = 2.5 * scale,
                    Color      = color
                };
                texts.Add(text);
            }

            texts.AddEntityToCurrentSpace();
        }