更新整理
This commit is contained in:
@@ -19,7 +19,7 @@ using Microsoft.Win32;
|
||||
using Nice3point.Revit.Toolkit.External.Handlers;
|
||||
|
||||
using OfficeOpenXml;
|
||||
|
||||
using ShrlAlgoToolkit.Revit.Assists;
|
||||
|
||||
namespace ShrlAlgo.Addin.Test;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using System;
|
||||
|
||||
using Autodesk.Revit.Attributes;
|
||||
using Autodesk.Revit.Attributes;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
|
||||
using Nice3point.Revit.Toolkit.External;
|
||||
using ShrlAlgoToolkit.Revit.Assists;
|
||||
using ShrlAlgoToolkit.Revit.Extensions;
|
||||
|
||||
|
||||
namespace ShrlAlgo.Addin.Test;
|
||||
|
||||
@@ -4,6 +4,7 @@ using Autodesk.Revit.Attributes;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using ShrlAlgoToolkit.Revit.Assists;
|
||||
|
||||
namespace ShrlAlgo.Addin.Test;
|
||||
[Transaction(TransactionMode.Manual)]
|
||||
|
||||
@@ -9,6 +9,9 @@ using Autodesk.Revit.DB;
|
||||
using Nice3point.Revit.Toolkit.External;
|
||||
using Nice3point.Revit.Toolkit.Utils;
|
||||
|
||||
using ShrlAlgoToolkit.Revit.Assists;
|
||||
using ShrlAlgoToolkit.Revit.Extensions;
|
||||
|
||||
namespace ShrlAlgo.Addin.Test;
|
||||
|
||||
[Transaction(TransactionMode.Manual)]
|
||||
@@ -110,6 +113,10 @@ internal class FluentAddin : ExternalCommand
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
var ids = Document.ActiveView.OfCollector().WhereElementIsNotElementType().Where(e => e.GetLevelId() == ElementId.InvalidElementId).Select(e => e.Id).ToList();
|
||||
UiDocument.Selection.SetElementIds(ids);
|
||||
return;
|
||||
var textTypes = Document.OfClass<TextNoteType>().ToList();
|
||||
var accessoryTypes = Document.OfClass<FamilySymbol>().OfCategory(BuiltInCategory.OST_PipeAccessory).WhereElementIsElementType().ToList();
|
||||
var filledRegionTypes = Document.OfClass<FilledRegionType>().ToList();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
|
||||
using WPFluent.Appearance;
|
||||
|
||||
|
||||
@@ -7,29 +8,29 @@ namespace ShrlAlgo.Addin.Test;
|
||||
/// <summary>
|
||||
/// FluentWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class FluentWindow
|
||||
public partial class FluentWindow
|
||||
{
|
||||
public FluentWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
ApplicationThemeManager.Apply(this);
|
||||
ApplicationThemeManager.Changed -= ApplicationThemeManager_Changed;
|
||||
ApplicationThemeManager.Changed += ApplicationThemeManager_Changed;
|
||||
//ApplicationThemeManager.Apply(this);
|
||||
//ApplicationThemeManager.Changed -= ApplicationThemeManager_Changed;
|
||||
//ApplicationThemeManager.Changed += ApplicationThemeManager_Changed;
|
||||
}
|
||||
private void ApplicationThemeManager_Changed(ApplicationTheme currentApplicationTheme, Color systemAccent)
|
||||
{
|
||||
ApplicationThemeManager.Apply(this);
|
||||
//ApplicationThemeManager.Apply(this);
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ApplicationThemeManager.GetAppTheme() == ApplicationTheme.Light)
|
||||
{
|
||||
ApplicationThemeManager.Apply(ApplicationTheme.Dark);
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationThemeManager.Apply(ApplicationTheme.Light);
|
||||
}
|
||||
//if (ApplicationThemeManager.GetAppTheme() == ApplicationTheme.Light)
|
||||
//{
|
||||
// ApplicationThemeManager.Apply(ApplicationTheme.Dark);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// ApplicationThemeManager.Apply(ApplicationTheme.Light);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
global using ShrlAlgo.Toolkit.Revit.Assist;
|
||||
global using ShrlAlgo.Toolkit.Revit.Helpers;
|
||||
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
|
||||
using Autodesk.Revit.Attributes;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
using Microsoft.Win32;
|
||||
|
||||
using Nice3point.Revit.Toolkit.External;
|
||||
|
||||
using ShrlAlgoToolkit.Revit.Assists;
|
||||
using ShrlAlgoToolkit.Revit.Extensions;
|
||||
|
||||
|
||||
namespace ShrlAlgo.Addin.Test;
|
||||
/// <summary>
|
||||
@@ -17,7 +24,29 @@ public class RemoveParamCmd : ExternalCommand
|
||||
{
|
||||
public override void Execute()
|
||||
{
|
||||
var list = new List<string>();
|
||||
var filter = "族文件|*.rfa";
|
||||
var openFile = new OpenFileDialog
|
||||
{
|
||||
Multiselect = true,
|
||||
Filter = filter
|
||||
};
|
||||
openFile.ShowDialog();
|
||||
if (openFile.FileNames.Length != 0)
|
||||
{
|
||||
var strFiles = openFile.FileNames;
|
||||
|
||||
foreach (var file in strFiles)
|
||||
{
|
||||
list.Add(file);
|
||||
}
|
||||
}
|
||||
foreach (var fileName in list)
|
||||
{
|
||||
var doc = Application.OpenDocumentFile(fileName);
|
||||
doc.Save();
|
||||
doc.Close(false);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 移除任意参数
|
||||
|
||||
@@ -7,7 +7,9 @@ using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
|
||||
using Nice3point.Revit.Toolkit.External;
|
||||
using ShrlAlgo.Toolkit.Core.Heplers;
|
||||
using ShrlAlgoToolkit.Core.Assists;
|
||||
using ShrlAlgoToolkit.Revit.Assists;
|
||||
using ShrlAlgoToolkit.Revit.Extensions;
|
||||
using Math = System.Math;
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Windows;
|
||||
using Autodesk.Revit.DB;
|
||||
|
||||
using Nice3point.Revit.Toolkit.External.Handlers;
|
||||
using ShrlAlgoToolkit.Revit.Assists;
|
||||
using Exception = System.Exception;
|
||||
|
||||
using UIFrameworkServices;
|
||||
|
||||
@@ -42,16 +42,8 @@
|
||||
<PackageReference Include="Nice3point.Revit.Toolkit" Version="2019.*" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ShrlAlgoToolkit.Core\ShrlAlgoToolkit.Core.csproj" />
|
||||
<ProjectReference Include="..\WPFluent\WPFluent.csproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\ShrlAlgo.Toolkit.Revit\ShrlAlgo.Toolkit.Revit.projitems" Label="Shared" />
|
||||
<Import Project="..\ShrlAlgo.Toolkit.Mvvm\ShrlAlgo.Toolkit.Mvvm.projitems" Label="Shared" />
|
||||
<Import Project="..\ShrlAlgo.Toolkit.Core\ShrlAlgo.Toolkit.Core.projitems" Label="Shared" />
|
||||
|
||||
<!--<Target Name="PreventRevitSDKCopyLocal" AfterTargets="ResolveReferences">
|
||||
<ItemGroup>
|
||||
--><!-- 暂时解决Revit SDK文件被复制到输出文件夹的问题 --><!--
|
||||
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' == 'Autodesk.Revit.SDK'" />
|
||||
</ItemGroup>
|
||||
</Target>-->
|
||||
<Import Project="..\ShrlAlgoToolkit.Revit\ShrlAlgoToolkit.Revit.projitems" Label="Shared" />
|
||||
</Project>
|
||||
@@ -4,6 +4,8 @@ using Autodesk.Revit.DB.Plumbing;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
|
||||
using Nice3point.Revit.Toolkit.External;
|
||||
using ShrlAlgoToolkit.Revit.Assists;
|
||||
using ShrlAlgoToolkit.Revit.Extensions;
|
||||
|
||||
|
||||
namespace ShrlAlgo.Addin.Test;
|
||||
|
||||
@@ -6,7 +6,7 @@ using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
using Nice3point.Revit.Toolkit.External;
|
||||
using ShrlAlgo.Toolkit.Core.Heplers;
|
||||
using ShrlAlgoToolkit.Core.Assists;
|
||||
|
||||
namespace ShrlAlgo.Addin.Test;
|
||||
|
||||
@@ -58,6 +58,6 @@ public class TestGDI : ExternalCommand
|
||||
var graphics = Graphics.FromHwnd(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle);
|
||||
var p = new System.Drawing.Point(rectangle.Left + 1920, rectangle.Top);
|
||||
var p1 = new System.Drawing.Point(rectangle.Right + 1920, rectangle.Bottom);
|
||||
GdiHelper.DrawLine(graphics, p, p1);
|
||||
GdiAssist.DrawLine(graphics, p, p1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user