整理控件库

This commit is contained in:
GG Z
2025-05-05 17:04:06 +08:00
parent 74532b77be
commit 3eaad7566e
283 changed files with 2156 additions and 17846 deletions

View File

@@ -1,4 +1,5 @@
using System.Diagnostics;
using System.Text;
using System.Windows;
@@ -113,7 +114,27 @@ internal class FluentAddin : ExternalCommand
}
public override void Execute()
{
var fm = Document.FamilyManager;
var current = fm.CurrentType;
var count = fm.Types.Size;
Document.Invoke(
ts =>
{
foreach (FamilyType item in fm.Types)
{
var b = string.IsNullOrWhiteSpace(item.Name);
//MessageBox.Show(item.Name);
if (b)
{
fm.CurrentType = item;
fm.DeleteCurrentType();
}
}
//fm.NewType("NewType");
});
return;
var ids = Document.ActiveView.OfCollector().WhereElementIsNotElementType().Where(e => e.GetLevelId() == ElementId.InvalidElementId).Select(e => e.Id).ToList();
UiDocument.Selection.SetElementIds(ids);
return;