Skip to content

Commit

Permalink
Add Parameter Type
Browse files Browse the repository at this point in the history
  • Loading branch information
chuongmep committed Apr 9, 2021
1 parent 7cd37d1 commit 4c4aebb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
4 changes: 3 additions & 1 deletion Command/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

namespace RevitElementBipChecker.Command
{
[Transaction(TransactionMode.Manual)]
[Transaction(TransactionMode.ReadOnly)]
[Regeneration(RegenerationOption.Manual)]
[Journaling(JournalingMode.UsingCommandData)]
public class Command : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
Expand Down
14 changes: 9 additions & 5 deletions View/MainWindows.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="Revit Element Bip Checker"
Width="Auto"
MinHeight="420"
MinWidth="700"
MinHeight="420"
d:DesignHeight="450"
d:DesignWidth="800"
ResizeMode="CanResize"
Expand Down Expand Up @@ -93,12 +93,12 @@
<ListView
Name="lsBipChecker"
Grid.Row="1"
GridViewColumnHeader.Click="GridViewColumnHeaderClickedHandler"
Grid.Column="1"
ScrollViewer.HorizontalScrollBarVisibility="Visible"
ScrollViewer.VerticalScrollBarVisibility="Visible"
Margin="10"
ItemsSource="{Binding Data}">
GridViewColumnHeader.Click="GridViewColumnHeaderClickedHandler"
ItemsSource="{Binding Data}"
ScrollViewer.HorizontalScrollBarVisibility="Visible"
ScrollViewer.VerticalScrollBarVisibility="Visible">
<ListView.View>
<GridView>
<GridViewColumn
Expand All @@ -117,6 +117,10 @@
Width="150"
DisplayMemberBinding="{Binding BuiltInParameter}"
Header="BuiltInParameter" />
<GridViewColumn
Width="150"
DisplayMemberBinding="{Binding ParameterType}"
Header="ParameterType" />
<GridViewColumn
Width="100"
DisplayMemberBinding="{Binding Type}"
Expand Down
2 changes: 2 additions & 0 deletions Viewmodel/ParameterData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public ParameterData(Parameter parameter,Document doc,bool isinstance=true)
this.ParameterName = parameter.Definition.Name;
this.Id = parameter.Id.ToString();
this.ParameterGroup = parameter.Definition.ParameterGroup.ToString();
this.ParameterType = parameter.Definition.ParameterType.ToString();
this.GroupName = LabelUtils.GetLabelFor(parameter.Definition.ParameterGroup);
this.Type = parameter.GetParameterType();
this.ReadWrite = parameter.IsReadWrite();
Expand All @@ -37,6 +38,7 @@ public ParameterData(Parameter parameter,Document doc,bool isinstance=true)
public string Value { get; set; }
public string StringValue { get; set; }
public string ParameterGroup { get; set; }
public string ParameterType { get; set; }
public string GroupName { get; set; }
public string Shared { get; set; }
public string GUID { get; set; }
Expand Down

0 comments on commit 4c4aebb

Please sign in to comment.