Exemplo n.º 1
0
        private static void IndexerElevation(BlockReference section)
        {
            var atrElev = section.EnumerateAttributes().FirstOrDefault(a => a.Tag.EqualsIgnoreCase("Этажность"));

            if (atrElev == null)
            {
                ed.WriteMessage("\nНе найден атрибут этажности в блоке секции.");
                return;
            }
            var elevVM   = new ElevationViewModel(int.Parse(atrElev.Text));
            var elevView = new ElevationView(elevVM);

            if (elevView.ShowDialog() == true)
            {
                var atr = atrElev.IdAtr.GetObject <AttributeReference>(OpenMode.ForWrite);
                atr.TextString = elevVM.Elevation.ToString();
            }
        }