添加项目文件。

This commit is contained in:
ShrlAlgo
2025-09-16 16:06:41 +08:00
parent 0e7807b826
commit 98c65ceb3d
922 changed files with 1009489 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
using System.Collections;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
namespace Szmedi.RvKits.DrawingTools;
public partial class CopyAnnotationViewModel : ObservableObject
{
public CopyAnnotationViewModel(UIApplication uiapp)
{
var doc = uiapp.ActiveUIDocument.Document;
View3Ds = new FilteredElementCollector(doc).OfClass(typeof(View3D)).Cast<View3D>().Where(v => !v.IsTemplate);
}
[ObservableProperty]
private IList<View3D> view3DsSelected;
[ObservableProperty] private IEnumerable view3Ds;
[RelayCommand]
private void Confirm(object obj)
{
if (obj is Window window)
{
if (View3DsSelected is { Count: > 0 })
{
window.DialogResult = true;
}
}
}
[RelayCommand]
private void SelectionChanged(object obj)
{
var type = obj.GetType();
View3DsSelected = ((ObservableCollection<object>)obj).Cast<View3D>().ToList();
}
}