优化更新
This commit is contained in:
@@ -1,24 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
using Nice3point.Revit.Toolkit.External.Handlers;
|
||||
|
||||
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
|
||||
|
||||
namespace RvAddinTest;
|
||||
/// <summary>
|
||||
/// CreateWindow.xaml 的交互逻辑
|
||||
@@ -52,21 +38,6 @@ public partial class CreateWindow
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
}
|
||||
//uiapp.Application.DocumentChanged -= Application_DocumentChanged;
|
||||
});
|
||||
}
|
||||
|
||||
private void Application_DocumentChanged(object sender, Autodesk.Revit.DB.Events.DocumentChangedEventArgs e)
|
||||
{
|
||||
if (e.GetAddedElementIds().Count == 1)
|
||||
{
|
||||
var id = e.GetAddedElementIds().FirstOrDefault();
|
||||
var elem = e.GetDocument().GetElement(id);
|
||||
if (elem is FamilyInstance ins && ins.Symbol.FamilyName.Contains("铜球阀"))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user