Skip to content

Commit c38c33b

Browse files
Release 2024.0.8 (#179)
* Update Readme.md * Github dark theme support * Psd image source * Nuke update * Fix usings * Switch demo project configuration * Async unit dialogs * Public snoop api * Family parameters: show definition name for user instead of "FamilyParameter" * An expicit Resharper rules for private fields (#176) for those like me who hates any prefixes of vars, fields, props etc. and who wants to calm down R# / Rider on RevitLookup project. Nothing is changed for others. * An extension to show associated family parameters (#175) * Add a new parameter extension to retrieve associated family parameter * make the results of parameter extension which gets associated family parameter snoopable * FailyParameterDescriptor implements IDescriptorCollector, so no need to define any useless methods * make extension manager context public readonly property * pull member up * register extension only for family editor environment * inline method + simplification - we don't need to double check extension.Context * Update editor settings * Cleanup * Remove reviewer * FamilyManager descriptor support * Fix issue 177 * Remove unused types * Fix element builder * Time support * Edit message * Context menu improvement * Set FontWeight * Fix column toggle * Add resources dictionary * Fix ManuItem namespace * Update Contributing.md * Update Changelog.md * Bump version * Update tracker * Icons update --------- Co-authored-by: Alexander Ignatovich <[email protected]>
1 parent 9221aac commit c38c33b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1314
-490
lines changed

.editorconfig

Lines changed: 530 additions & 6 deletions
Large diffs are not rendered by default.

Benchmarks/Benchmarks.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net48</TargetFramework>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>disable</Nullable>
74
<LangVersion>latest</LangVersion>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<TargetFramework>net48</TargetFramework>
87
</PropertyGroup>
98
<ItemGroup>
109
<PackageReference Include="BenchmarkDotNet" Version="0.13.5" />

Build/Build.CI.GitHub.cs

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,35 @@ partial class Build
4242
await ReleaseDraftAsync(gitHubOwner, gitHubName, draft);
4343
});
4444

45+
static async Task CheckTagsAsync(string gitHubOwner, string gitHubName, string version)
46+
{
47+
var gitHubTags = await GitHubTasks.GitHubClient.Repository.GetAllTags(gitHubOwner, gitHubName);
48+
if (gitHubTags.Select(tag => tag.Name).Contains(version))
49+
throw new ArgumentException($"A Release with the specified tag already exists in the repository: {version}");
50+
}
51+
52+
static async Task<Release> CreatedDraftAsync(string gitHubOwner, string gitHubName, NewRelease newRelease) =>
53+
await GitHubTasks.GitHubClient.Repository.Release.Create(gitHubOwner, gitHubName, newRelease);
54+
55+
static async Task ReleaseDraftAsync(string gitHubOwner, string gitHubName, Release draft) =>
56+
await GitHubTasks.GitHubClient.Repository.Release.Edit(gitHubOwner, gitHubName, draft.Id, new ReleaseUpdate {Draft = false});
57+
58+
static async Task UploadArtifactsAsync(Release createdRelease, string[] artifacts)
59+
{
60+
foreach (var file in artifacts)
61+
{
62+
var releaseAssetUpload = new ReleaseAssetUpload
63+
{
64+
ContentType = "application/x-binary",
65+
FileName = Path.GetFileName(file),
66+
RawData = File.OpenRead(file)
67+
};
68+
69+
await GitHubTasks.GitHubClient.Repository.Release.UploadAsset(createdRelease, releaseAssetUpload);
70+
Log.Information("Artifact: {Path}", file);
71+
}
72+
}
73+
4574
string CreateChangelog(string version)
4675
{
4776
if (!File.Exists(ChangeLogPath))
@@ -73,33 +102,4 @@ string CreateChangelog(string version)
73102
if (logBuilder.Length == 0) Log.Warning("No version entry exists in the changelog: {Version}", version);
74103
return logBuilder.ToString();
75104
}
76-
77-
static async Task CheckTagsAsync(string gitHubOwner, string gitHubName, string version)
78-
{
79-
var gitHubTags = await GitHubTasks.GitHubClient.Repository.GetAllTags(gitHubOwner, gitHubName);
80-
if (gitHubTags.Select(tag => tag.Name).Contains(version))
81-
throw new ArgumentException($"A Release with the specified tag already exists in the repository: {version}");
82-
}
83-
84-
static async Task<Release> CreatedDraftAsync(string gitHubOwner, string gitHubName, NewRelease newRelease) =>
85-
await GitHubTasks.GitHubClient.Repository.Release.Create(gitHubOwner, gitHubName, newRelease);
86-
87-
static async Task ReleaseDraftAsync(string gitHubOwner, string gitHubName, Release draft) =>
88-
await GitHubTasks.GitHubClient.Repository.Release.Edit(gitHubOwner, gitHubName, draft.Id, new ReleaseUpdate {Draft = false});
89-
90-
static async Task UploadArtifactsAsync(Release createdRelease, string[] artifacts)
91-
{
92-
foreach (var file in artifacts)
93-
{
94-
var releaseAssetUpload = new ReleaseAssetUpload
95-
{
96-
ContentType = "application/x-binary",
97-
FileName = Path.GetFileName(file),
98-
RawData = File.OpenRead(file)
99-
};
100-
101-
await GitHubTasks.GitHubClient.Repository.Release.UploadAsset(createdRelease, releaseAssetUpload);
102-
Log.Information("Artifact: {Path}", file);
103-
}
104-
}
105105
}

Build/Build.Clean.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
using Nuke.Common;
2+
using Nuke.Common.IO;
3+
using Serilog;
24
using static Nuke.Common.IO.FileSystemTasks;
35

46
partial class Build
@@ -7,9 +9,15 @@ partial class Build
79
.OnlyWhenStatic(() => IsLocalBuild)
810
.Executes(() =>
911
{
10-
EnsureCleanDirectory(ArtifactsDirectory);
12+
CleanDirectory(ArtifactsDirectory);
1113

1214
foreach (var project in Solution.AllProjects.Where(project => project != Solution.Build))
13-
EnsureCleanDirectory(project.Directory / "bin");
15+
CleanDirectory(project.Directory / "bin");
1416
});
17+
18+
static void CleanDirectory(AbsolutePath path)
19+
{
20+
Log.Information("Cleaning directory: {Directory}", path);
21+
path.CreateOrCleanDirectory();
22+
}
1523
}

Build/Build.Configuration.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ protected override void OnBuildCreated()
2020

2121
VersionMap = new()
2222
{
23-
{"Release R21", "2021.2.7"},
24-
{"Release R22", "2022.2.7"},
25-
{"Release R23", "2023.2.7"},
26-
{"Release R24", "2024.0.7"}
23+
{"Release R21", "2021.2.8"},
24+
{"Release R22", "2022.2.8"},
25+
{"Release R23", "2023.2.8"},
26+
{"Release R24", "2024.0.8"}
2727
};
2828
}
2929
}

Build/Build.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<Platforms>AnyCPU</Platforms>
1212
</PropertyGroup>
1313
<ItemGroup>
14-
<PackageReference Include="Nuke.Common" Version="6.3.0" />
14+
<PackageReference Include="Nuke.Common" Version="7.0.0" />
1515
</ItemGroup>
1616
<ItemGroup>
1717
<PackageDownload Include="GitVersion.Tool" Version="[5.12.0]" />

Changelog.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
# Changelog
22

3+
# 2023-06-22 **2024.0.8**
4+
5+
## Features
6+
7+
### Core
8+
9+
* Computing Time Tracking
10+
11+
This feature includes the ability to monitor the computing time taken to invoke a member, such as methods or properties.
12+
By tracking the execution time, you can identify and analyze slow-performing methods or properties, gaining insights into their overall performance.
13+
The computing time is displayed in a separate column and a tooltip, providing you with detailed information. This feature is optional and disabled by default
14+
15+
![image](https://github.com/jeremytammik/RevitLookup/assets/20504884/9f9c816f-2f49-49a0-9757-6f0bb0000113)
16+
17+
### User interface
18+
19+
* Context Menu
20+
21+
A convenient context menu has been added to the table, providing you with additional options to manage columns and update contents.
22+
This menu enables you to customize your table view and effortlessly perform actions to enhance your experience.
23+
24+
![image](https://github.com/jeremytammik/RevitLookup/assets/20504884/25491ace-1d16-46cc-9dc3-3e5016b266a0)
25+
26+
* Enhanced Visualization
27+
28+
Icons have been added to the context menu, making it more visually appealing and intuitive for users to navigate and interact with the available options.
29+
30+
![image](https://github.com/jeremytammik/RevitLookup/assets/20504884/afe44cbf-6e5b-4508-beda-b5a4e7babcf2)
31+
32+
## Improvements
33+
34+
* Added async support for unit dialogs
35+
* Added API for external programs https://github.com/jeremytammik/RevitLookup/issues/171
36+
* Added FamilyParameter support by @CADBIMDeveloper in https://github.com/jeremytammik/RevitLookup/pull/174
37+
* Added FamilyManager.GetAssociatedFamilyParameter extension by @CADBIMDeveloper in https://github.com/jeremytammik/RevitLookup/pull/175
38+
39+
## Bugs
40+
41+
* Fixed shortcuts reloading leading to incorrect ribbon update https://github.com/jeremytammik/RevitLookup/issues/177
42+
43+
Full changelog: https://github.com/jeremytammik/RevitLookup/compare/2024.0.7...2024.0.8
44+
345
# 2023-06-03 **2024.0.7**
446

547
Corrective update to the last major release [RevitLookup 2024.0.6](https://github.com/jeremytammik/RevitLookup/releases/tag/2024.0.6)

Codeowners

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
# These owners will be the default owners for everything in the repo,
55
# and will automatically be added as reviewers to all pull requests.
6-
* @Nice3point @jeremytammik
6+
* @Nice3point

Contributing.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ Indicates that the descriptor can retrieve object members by reflection.
4444
If you add this interface, the user can click on the object and analyze its members.
4545

4646
```c#
47-
public sealed class ApiObjectDescriptor : Descriptor, IDescriptorCollector
47+
public sealed class ApplicationDescriptor : Descriptor, IDescriptorCollector
4848
{
49+
public ApplicationDescriptor(Autodesk.Revit.ApplicationServices.Application application)
50+
{
51+
Name = application.VersionName;
52+
}
4953
}
5054
```
5155

@@ -138,19 +142,21 @@ Adding an option for the context menu:
138142
```c#
139143
public sealed class ElementDescriptor : Descriptor, IDescriptorConnector
140144
{
141-
public MenuItem[] RegisterMenu()
145+
public void RegisterMenu(ContextMenu contextMenu, UIElement bindableElement)
142146
{
143-
return new[]
144-
{
145-
MenuItem.Create("Show element")
146-
.AddCommand(_element, element =>
147+
if (_element is ElementType) return;
148+
149+
contextMenu.AddMenuItem("Show element")
150+
.SetCommand(_element, element =>
151+
{
152+
Application.ActionEventHandler.Raise(_ =>
147153
{
148154
if (RevitApi.UiDocument is null) return;
149155
RevitApi.UiDocument.ShowElements(element);
150156
RevitApi.UiDocument.Selection.SetElementIds(new List<ElementId>(1) {element.Id});
151-
})
152-
.AddGesture(ModifierKeys.Alt, Key.F7)
153-
};
157+
});
158+
})
159+
.AddShortcut(bindableElement, ModifierKeys.Alt, Key.F7);
154160
}
155161
}
156162
```

Readme.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<div align="center">
2-
<img alt="RevitLookup" width="600" src="https://user-images.githubusercontent.com/20504884/218192495-19b13547-ce67-40e3-8fe8-e847f89bddb7.png"/>
2+
<picture>
3+
<source media="(prefers-color-scheme: dark)" srcset="https://github-production-user-asset-6210df.s3.amazonaws.com/20504884/243138822-e25cbe43-91ce-4c90-9fbd-e0c6c9f9996c.png">
4+
<img alt="RevitLookup" width="600" src="https://github-production-user-asset-6210df.s3.amazonaws.com/20504884/243138821-45a22919-4865-478e-8cfe-dc6288646d44.png">
5+
</picture>
36
</div>
47

58
Interactive Revit project database exploration tool to view and navigate BIM element parameters, properties and relationships.
@@ -13,7 +16,7 @@ Whether you are a seasoned professional or just starting out, the RevitLookup is
1316
</div>
1417
<br/>
1518
<div align="center">
16-
<img alt="Screenshot" src="https://user-images.githubusercontent.com/20504884/225871636-21c17658-d02e-411c-93cd-34e4d2121933.png"/>
19+
<img alt="Screenshot" src="https://github.com/jeremytammik/RevitLookup/assets/20504884/e8cfa664-ee2e-4b75-9652-c0d4efe5ab7d"/>
1720
</div>
1821

1922
## Installation

0 commit comments

Comments
 (0)