/// <summary> /// Обработка двойного клика по блоку /// </summary> private static void AcApp_BeginDoubleClick(object sender, BeginDoubleClickEventArgs e) { var psr = AcadUtils.Editor.SelectImplied(); if (psr.Status != PromptStatus.OK) { return; } var ids = psr.Value.GetObjectIds(); if (ids.Length != 1) { return; } using (AcadUtils.Document.LockDocument()) { using (var tr = AcadUtils.Document.TransactionManager.StartTransaction()) { var obj = tr.GetObject(ids[0], OpenMode.ForWrite, true, true); if (obj is BlockReference blockReference) { var applicableAppName = ExtendedDataUtils.ApplicableAppName(blockReference); if (string.IsNullOrEmpty(applicableAppName)) { BeditCommandWatcher.UseBedit = true; } else if (applicableAppName == AxisDescriptor.Instance.Name) { EntityUtils.DoubleClickEdit(blockReference, entity => new AxisValueEditor(entity)); } else if (applicableAppName == SectionDescriptor.Instance.Name) { EntityUtils.DoubleClickEdit(blockReference, entity => new SectionValueEditor(entity)); } else if (applicableAppName == LevelMarkDescriptor.Instance.Name) { EntityUtils.DoubleClickEdit(blockReference, entity => new LevelMarkValueEditor(entity)); } else { BeditCommandWatcher.UseBedit = true; } } else { BeditCommandWatcher.UseBedit = true; } tr.Commit(); } } }