修复错误
This commit is contained in:
@@ -110,6 +110,6 @@
|
||||
Command="{Binding ConnectCommand}"
|
||||
Content="连接管线"
|
||||
HorizontalAlignment="Stretch"
|
||||
ui:ButtonAssist.Icon="PlugConnect" />
|
||||
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=PlugConnect}" />
|
||||
</ui:StackPanel>
|
||||
</ui:NeoWindow>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Autodesk.Revit.Attributes;
|
||||
using Autodesk.Revit.DB;
|
||||
|
||||
using Nice3point.Revit.Toolkit.External;
|
||||
|
||||
|
||||
@@ -11,27 +12,34 @@ namespace ShrlAlgoToolkit.RevitAddins.RvMEP
|
||||
{
|
||||
public override void Execute()
|
||||
{
|
||||
ICollection<FamilyInstance> familyInstances;
|
||||
if (UiDocument.Selection.GetElementIds().Count > 0)
|
||||
try
|
||||
{
|
||||
ICollection<FamilyInstance> familyInstances;
|
||||
if (UiDocument.Selection.GetElementIds().Count > 0)
|
||||
{
|
||||
familyInstances = UiDocument.Selection.GetElementIds().Select(Document.GetElement).OfType<FamilyInstance>().ToList();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
familyInstances = UiDocument.SelectObjects<FamilyInstance>("请选择族实例");
|
||||
}
|
||||
Document.Invoke(
|
||||
ts =>
|
||||
{
|
||||
foreach (var ins in familyInstances)
|
||||
{
|
||||
if (ins.CanFlipWorkPlane)
|
||||
{
|
||||
ins.IsWorkPlaneFlipped = !ins.IsWorkPlaneFlipped;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
familyInstances = UiDocument.Selection.GetElementIds().Select(Document.GetElement).OfType<FamilyInstance>().ToList();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
familyInstances = UiDocument.SelectObjects<FamilyInstance>("请选择族实例");
|
||||
}
|
||||
Document.Invoke(
|
||||
ts =>
|
||||
{
|
||||
foreach (var ins in familyInstances)
|
||||
{
|
||||
if (ins.CanFlipWorkPlane)
|
||||
{
|
||||
ins.IsWorkPlaneFlipped = !ins.IsWorkPlaneFlipped;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.HeadroomCheckView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:conv="clr-namespace:ShrlAlgoToolkit.RevitAddins.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvMEP"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
@@ -36,7 +37,7 @@
|
||||
<DataGrid.Columns>
|
||||
<DataGridCheckBoxColumn
|
||||
Binding="{Binding IsSelected}"
|
||||
ElementStyle="{StaticResource DataGridCheckBoxElementDefaultStyle}"
|
||||
ElementStyle="{StaticResource DataGridCheckBox}"
|
||||
Header="选择"
|
||||
Width="60" />
|
||||
<DataGridTextColumn
|
||||
@@ -46,7 +47,7 @@
|
||||
<DataGridTemplateColumn Header="颜色" IsReadOnly="True">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Border Background="{Binding Color, Converter={StaticResource Revit2MediaColorConverter}}" ToolTip="生成三维房间时的颜色" />
|
||||
<Border Background="{Binding Color, Converter={x:Static conv:Rv2WinColorConverter.Instance}}" ToolTip="生成三维房间时的颜色" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
</RadioButton.IsChecked>
|
||||
</RadioButton>
|
||||
<RadioButton Content="自定义" x:Name="LbCustom" />
|
||||
<TextBox Text="{Binding Angle, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=LbCustom}" />
|
||||
<TextBox Text="{Binding Angle, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding IsChecked, Converter={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}, ElementName=LbCustom}" />
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
<CheckBox
|
||||
|
||||
Reference in New Issue
Block a user