更新整理

This commit is contained in:
GG Z
2025-04-24 20:56:44 +08:00
parent 155cef46f8
commit 5b6d67b571
813 changed files with 14437 additions and 12362 deletions

View File

@@ -4,9 +4,9 @@ using Autodesk.Revit.DB.Mechanical;
using Autodesk.Revit.DB.Plumbing;
using Autodesk.Revit.UI;
using ShrlAlgo.RvKits.Windows;
using ShrlAlgoToolkit.RevitAddins.Windows;
namespace ShrlAlgo.RvKits.ModelManager;
namespace ShrlAlgoToolkit.RevitAddins.ModelManager;
public class CorrectReferLevelExecutes
{

View File

@@ -1,14 +1,12 @@
using Autodesk.Revit.Attributes;
using Nice3point.Revit.Toolkit.External;
using ShrlAlgoToolkit.Core.Assists;
using ShrlAlgo.Toolkit.Core.Assist;
using ShrlAlgoToolkit.Core.Assist;
namespace ShrlAlgo.RvKits.ModelManager;
namespace ShrlAlgoToolkit.RevitAddins.ModelManager;
[Transaction(TransactionMode.Manual)]
[Regeneration(RegenerationOption.Manual)]
public class ModelCheckCmd : ExternalCommand
{
public override void Execute() => SingletonChildWindowManager.ShowOrActivate<ModelCheckView, ModelCheckViewModel>(UiApplication);//ModelCheckView view = SingletonViewHelper<ModelCheckView>.GetInstance(out var isNewCreate);//if (isNewCreate)//{// view.DataContext = new ModelCheckViewModel(uiApplication);// view.ShowAhead();//}//view.Activate();
public override void Execute() => SingletonChildWindowManager.ShowOrActivate<ModelCheckView, ModelCheckViewModel>(UiApplication);//ModelCheckView view = SingletonViewAssist<ModelCheckView>.GetInstance(out var isNewCreate);//if (isNewCreate)//{// view.DataContext = new ModelCheckViewModel(uiApplication);// view.ShowAhead();//}//view.Activate();
}

View File

@@ -1,26 +1,26 @@
<wpf:FluentWindowEx
x:Class="ShrlAlgo.RvKits.ModelManager.ModelCheckView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ShrlAlgo.RvKits.RvFamily"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wpf="https://github.com/ShrlAlgo/WPFluent"
xmlns:modelManager="clr-namespace:ShrlAlgo.RvKits.ModelManager"
MinHeight="500"
Title="模型检查"
Width="600"
MinHeight="500"
d:DataContext="{d:DesignInstance modelManager:ModelCheckViewModel}"
mc:Ignorable="d"
wpf:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
wpf:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
mc:Ignorable="d">
x:Class="ShrlAlgoToolkit.RevitAddins.ModelManager.ModelCheckView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvFamily"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:modelManager="clr-namespace:ShrlAlgoToolkit.RevitAddins.ModelManager"
xmlns:wpf="https://github.com/ShrlAlgo/WPFluent"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style x:Key="GroupHeaderStyle" TargetType="{x:Type GroupItem}">
<Style TargetType="{x:Type GroupItem}" x:Key="GroupHeaderStyle">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
@@ -41,9 +41,9 @@
Columns="*,Auto"
Rows="*,Auto,Auto">
<DataGrid
Grid.ColumnSpan="2"
AutoGenerateColumns="False"
CanUserAddRows="False"
Grid.ColumnSpan="2"
IsReadOnly="True"
ItemsSource="{Binding Items}"
ToolTip="双击行可快速定位">
@@ -90,9 +90,9 @@
</DataGrid.Columns>
</DataGrid>
<StackPanel
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2">
Grid.ColumnSpan="2"
Grid.Row="1">
<wpf:Card>
<TextBlock Text="{Binding ProjectBasePoint, StringFormat=项目基点:{}{0}}" />
</wpf:Card>
@@ -101,8 +101,8 @@
</wpf:Card>
</StackPanel>
<UniformGrid
Grid.Row="2"
Grid.Column="0"
Grid.Row="2"
Rows="3">
<CheckBox
Content="管线坡度"
@@ -134,8 +134,8 @@
ToolTip="检查管线是否重叠" />
</UniformGrid>
<UniformGrid
Grid.Row="2"
Grid.Column="1"
Grid.Row="2"
Rows="2">
<UniformGrid Rows="2">
<TextBlock Text="{Binding ErrorCount, Mode=TwoWay, StringFormat=错误数量:{}{0}}" TextWrapping="WrapWithOverflow" />
@@ -143,20 +143,20 @@
</UniformGrid>
<UniformGrid Rows="2">
<Button
Width="80"
Margin="5"
Command="{Binding CheckModelCommand}"
Content="模型检查" />
<Button
Width="80"
Command="{Binding ExportToExcelCommand}"
Content="导出结果" />
<Button
Width="80"
Content="模型检查"
Margin="5"
Width="80" />
<Button
Command="{Binding ExportToExcelCommand}"
Content="导出结果"
Width="80" />
<Button
Command="{Binding ModifyModelCommand}"
Content="矫正错误"
ToolTip="对参照标高进行修改、立管坡度修正" />
Margin="5"
ToolTip="对参照标高进行修改、立管坡度修正"
Width="80" />
</UniformGrid>
</UniformGrid>
</wpf:AutoGrid>

View File

@@ -1,4 +1,4 @@
namespace ShrlAlgo.RvKits.ModelManager
namespace ShrlAlgoToolkit.RevitAddins.ModelManager
{
/// <summary>
/// ModelCheckView.xaml 的交互逻辑

View File

@@ -10,16 +10,14 @@ using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Microsoft.Win32;
using Nice3point.Revit.Toolkit.External.Handlers;
using ShrlAlgoToolkit.Core.Assists;
using Sai.RvKits.Assists;
using ShrlAlgo.RvKits.Windows;
using ShrlAlgo.Toolkit.Core.Assist;
using ShrlAlgoToolkit.Core.Assist;
using ShrlAlgoToolkit.RevitAddins.Assists;
using ShrlAlgoToolkit.RevitAddins.Windows;
// ReSharper disable PossibleMultipleEnumeration
namespace ShrlAlgo.RvKits.ModelManager;
namespace ShrlAlgoToolkit.RevitAddins.ModelManager;
public partial class ModelCheckViewModel : ObservableObject
{
@@ -427,7 +425,7 @@ public partial class ModelCheckViewModel : ObservableObject
}
catch (Exception ex)
{
LogHelper.ToLog(ex.Message);
LogAssist.ToLog(ex.Message);
}
}

View File

@@ -1,12 +1,8 @@
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Nice3point.Revit.Toolkit.External;
using ShrlAlgoToolkit.Core.Assists;
using ShrlAlgo.Toolkit.Core.Assist;
using ShrlAlgoToolkit.Core.Assist;
namespace ShrlAlgo.RvKits.ModelManager;
namespace ShrlAlgoToolkit.RevitAddins.ModelManager;
[Transaction(TransactionMode.Manual)]
[Regeneration(RegenerationOption.Manual)]
public class SeparateModelCmd : ExternalCommand

View File

@@ -1,16 +1,16 @@
using System.IO;
using System.Windows;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Nice3point.Revit.Toolkit.External.Handlers;
using System.IO;
using System.Windows;
using UIFrameworkServices;
namespace ShrlAlgo.RvKits.ModelManager
namespace ShrlAlgoToolkit.RevitAddins.ModelManager
{
public partial class SeparateModelViewModel : ObservableObject
{

View File

@@ -1,19 +1,18 @@
<ui:FluentWindowEx
x:Class="ShrlAlgo.RvKits.ModelManager.SeparateModelWin"
Height="300"
SizeToContent="Height"
Title="拆分模型"
Topmost="True"
Width="300"
d:DataContext="{d:DesignInstance Type=local:SeparateModelViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.ModelManager.SeparateModelWin"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ShrlAlgo.RvKits.ModelManager"
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.ModelManager"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
Title="拆分模型"
Width="300"
Height="300"
d:DataContext="{d:DesignInstance Type=local:SeparateModelViewModel}"
SizeToContent="Height"
Topmost="True"
mc:Ignorable="d">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ui:FluentWindowEx.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</ui:FluentWindowEx.Resources>
@@ -28,10 +27,10 @@
PlaceholderText="保存路径"
Text="{Binding FolderPath, UpdateSourceTrigger=PropertyChanged}" />
<ui:Button
Margin="5"
HorizontalAlignment="Stretch"
Command="{Binding SeparateCommand}"
Content="拆分" />
Content="拆分"
HorizontalAlignment="Stretch"
Margin="5" />
</StackPanel>
</Grid>
</ui:FluentWindowEx>

View File

@@ -1,6 +1,6 @@
using WPFluent.Controls;
namespace ShrlAlgo.RvKits.ModelManager;
namespace ShrlAlgoToolkit.RevitAddins.ModelManager;
/// <summary>
/// SeparateModelWin.xaml 的交互逻辑
/// </summary>

View File

@@ -1,9 +1,7 @@
using Autodesk.Revit.Attributes;
using Nice3point.Revit.Toolkit.External;
namespace ShrlAlgo.RvKits.ModelManager;
namespace ShrlAlgoToolkit.RevitAddins.ModelManager;
[Transaction(TransactionMode.Manual)]
[Regeneration(RegenerationOption.Manual)]

View File

@@ -1,17 +1,17 @@
<ui:FluentWindow
x:Class="ShrlAlgo.RvKits.ModelManager.TemplateManagerView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ShrlAlgo.RvKits.ModelManager"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
Width="800"
Height="450"
Width="800"
d:DataContext="{d:DesignInstance Type=local:TemplateManagerViewModel}"
mc:Ignorable="d"
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
mc:Ignorable="d">
x:Class="ShrlAlgoToolkit.RevitAddins.ModelManager.TemplateManagerView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.ModelManager"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>

View File

@@ -1,18 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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;
namespace ShrlAlgo.RvKits.ModelManager;
namespace ShrlAlgoToolkit.RevitAddins.ModelManager;
/// <summary>
/// TemplateManagerView.xaml 的交互逻辑
/// </summary>

View File

@@ -1,16 +1,13 @@
using System.Drawing;
using System.Drawing.Text;
using Autodesk.Revit.DB;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Nice3point.Revit.Toolkit.External.Handlers;
using Nice3point.Revit.Toolkit.Options;
namespace ShrlAlgo.RvKits.ModelManager;
namespace ShrlAlgoToolkit.RevitAddins.ModelManager;
public partial class TemplateManagerViewModel : ObservableObject
{
@@ -121,9 +118,9 @@ public partial class TemplateManagerViewModel : ObservableObject
type.get_Parameter(BuiltInParameter.TEXT_FONT)?.SetValueString(
$"{SelectFontFamily.Name}");
//字体大小
type.get_Parameter(BuiltInParameter.TEXT_SIZE)?.Set(FontSize);
type.get_Parameter(BuiltInParameter.TEXT_SIZE)?.Set((double)FontSize);
//宽度系数
type.get_Parameter(BuiltInParameter.TEXT_WIDTH_SCALE)?.Set(WidthScale);
type.get_Parameter(BuiltInParameter.TEXT_WIDTH_SCALE)?.Set((double)WidthScale);
}
var textNotes = familyEditing.OfClass<TextNote>().Cast<TextNote>();
@@ -141,9 +138,9 @@ public partial class TemplateManagerViewModel : ObservableObject
type.get_Parameter(BuiltInParameter.TEXT_FONT)?.SetValueString(
$"{SelectFontFamily.Name}");
//字体大小
type.get_Parameter(BuiltInParameter.TEXT_SIZE)?.Set(FontSize);
type.get_Parameter(BuiltInParameter.TEXT_SIZE)?.Set((double)FontSize);
//宽度系数
type.get_Parameter(BuiltInParameter.TEXT_WIDTH_SCALE)?.Set(WidthScale);
type.get_Parameter(BuiltInParameter.TEXT_WIDTH_SCALE)?.Set((double)WidthScale);
}
});
doc.Invoke(