Compare commits

..

26 Commits

Author SHA1 Message Date
Oğuzhan Koral deb2d7fd37 Merge pull request #633 from specklesystems/dev
.NET Build and Publish / build-windows (push) Has been cancelled
.NET Build and Publish / build-linux (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update dev to release
2025-02-27 14:10:33 +03:00
Jedd Morgan 345a555eba Merge pull request #630 from specklesystems/dev
Release to test Tekla
2025-02-26 18:30:57 +00:00
Jedd Morgan 85b6468939 Merge pull request #626 from specklesystems/dev
Retrigger test release
2025-02-26 15:28:43 +00:00
Jedd Morgan c55db8e275 Merge pull request #625 from specklesystems/dev
Test release to test new installers
2025-02-26 11:51:29 +00:00
Jedd Morgan 641c36e9a8 Merge pull request #620 from specklesystems/dev
Test release again
2025-02-25 13:34:39 +00:00
Jedd Morgan c859a0c44d Merge pull request #618 from specklesystems/dev
Test release of desktop services and installers
2025-02-24 17:43:26 +00:00
Oğuzhan Koral 4bbddd46b5 Merge pull request #601 from specklesystems/dev
.NET Build and Publish / build-windows (push) Has been cancelled
.NET Build and Publish / build-linux (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update release to dev
2025-02-19 03:15:43 +03:00
Oğuzhan Koral 96e729ef50 Merge pull request #595 from specklesystems/dev
.NET Build and Publish / build-windows (push) Has been cancelled
.NET Build and Publish / build-linux (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update releases to dev
2025-02-18 19:38:22 +03:00
Björn Steinhagen 6d4e12dfae Merge pull request #591 from specklesystems/dev
test(etabs): bundled installer with ini file magic
2025-02-17 13:52:57 +01:00
Oğuzhan Koral 929db22785 Merge pull request #578 from specklesystems/dev
.NET Build and Publish / build-windows (push) Has been cancelled
.NET Build and Publish / build-linux (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
update release from dev
2025-02-10 17:53:46 +00:00
Jedd Morgan 931d7ff8d2 Merge pull request #577 from specklesystems/dev
test(etabs): installer
2025-02-10 10:27:38 +00:00
Jedd Morgan e78914955c Merge pull request #541 from specklesystems/dev
test(etabs): installer
2025-01-30 17:22:52 +00:00
Jedd Morgan 87569c9c66 Merge pull request #537 from specklesystems/dev
Test for ETABS installer
2025-01-29 15:19:34 +00:00
Oğuzhan Koral 189ea3a19b Merge pull request #501 from specklesystems/dev
.NET Build and Publish / build-windows (push) Has been cancelled
.NET Build and Publish / build-linux (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update dev to release
2025-01-16 19:18:02 +03:00
Oğuzhan Koral 370588fa89 Merge pull request #461 from specklesystems/dev
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update dev to release
2024-12-20 16:14:59 +03:00
Oğuzhan Koral c9802396f5 Merge pull request #448 from specklesystems/dev
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update dev to release
2024-12-13 01:54:05 +03:00
Oğuzhan Koral 9644444ea7 Merge pull request #437 from specklesystems/dev
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update dev to release
2024-12-04 22:38:16 +03:00
Alan Rynne bb0fffd4d7 Merge pull request #414 from specklesystems/dev
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update `release/3.0.0` with changes from `dev`
2024-11-27 16:23:50 +01:00
Alan Rynne c719cfd66f Merge pull request #383 from specklesystems/dev
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update `release/3.0.0` with changes from `dev`
2024-11-12 15:56:02 +01:00
Oğuzhan Koral 92435ce1a1 Merge pull request #376 from specklesystems/dev
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update release/3.0.0 with changes from dev
2024-11-08 18:16:16 +00:00
Oğuzhan Koral 71409e8af8 Merge pull request #374 from specklesystems/dev
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update release/3.0.0 with changes from dev
2024-11-08 15:13:47 +00:00
Alan Rynne 8060f46882 Merge pull request #359 from specklesystems/dev
Update `release/3.0.0` with changes from `dev`
2024-11-06 18:49:52 +01:00
Alan Rynne 6671edd36e Merge pull request #354 from specklesystems/dev
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update `release/3.0.0` with changes from `dev`
2024-11-06 14:22:08 +01:00
Alan Rynne bc15ff3a34 Merge pull request #347 from specklesystems/dev
Update `release/3.0.0` with changes from `dev`
2024-11-05 10:30:20 +01:00
Alan Rynne de275dcf02 Merge pull request #337 from specklesystems/dev
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update `release/3.0.0` with changes from `dev`
2024-10-31 12:17:57 +01:00
Alan Rynne 6158739df0 Merge pull request #331 from specklesystems/dev
Update `release/3.0.0` with changes from `dev`
2024-10-28 13:05:26 +01:00
240 changed files with 2200 additions and 6986 deletions
+3 -3
View File
@@ -9,10 +9,10 @@
],
"rollForward": false
},
"dotnet-affected": {
"version": "5.0.0",
"gitversion.tool": {
"version": "6.0.2",
"commands": [
"dotnet-affected"
"dotnet-gitversion"
],
"rollForward": false
}
+3 -3
View File
@@ -1,7 +1,9 @@
name: .NET Build
on:
pull_request
pull_request: # Run build on every pull request that is not to main
branches-ignore:
- main
jobs:
build:
@@ -32,8 +34,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
+16 -13
View File
@@ -2,14 +2,12 @@ name: .NET Build and Publish
on:
push:
branches: ["main", "installer-test/**"]
branches: ["main", "dev", "release/*"] # Continuous delivery on every long-lived branch
tags: ["v3.*"] # Manual delivery on every 3.x tag
jobs:
build-windows:
runs-on: windows-latest
env:
SPECKLE_VERSION: "unset"
outputs:
version: ${{ steps.set-version.outputs.version }}
steps:
@@ -29,35 +27,38 @@ jobs:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
- name: ⚒️ Run GitVersion on Windows
run: ./build.ps1 build-server-version
- name: ⚒️ Run build on Windows
run: ./build.ps1 zip
run: ./build.ps1
- name: ⬆️ Upload artifacts
uses: actions/upload-artifact@v4
with:
name: output-${{ env.SPECKLE_VERSION }}
name: output-${{ env.GitVersion_FullSemVer }}
path: output/*.*
if-no-files-found: error
retention-days: 1
compression-level: 0 # no compression
compression-level: 0 # no compression
- id: set-version
name: Set version to output
run: echo "version=${{ env.SPECKLE_VERSION }}" >> "$Env:GITHUB_OUTPUT"
run: echo "version=${{ env.GitVersion_FullSemVer }}" >> "$Env:GITHUB_OUTPUT"
deploy-installers:
runs-on: ubuntu-latest
needs: build-windows
env:
IS_PUBLIC_RELEASE: ${{ github.ref_type == 'tag' }}
IS_TEST_INSTALLER: ${{ github.ref_type != 'tag' }}
IS_TAG_BUILD: ${{ github.ref_type == 'tag' }}
IS_RELEASE_BRANCH: ${{ startsWith(github.ref_name, 'release/') || github.ref_name == 'main'}}
steps:
- name: 🔫 Trigger Build Installers
uses: ALEEF02/workflow-dispatch@v3.0.0
continue-on-error: true
with:
workflow: Build Installers
repo: specklesystems/connector-installers
token: ${{ secrets.CONNECTORS_GH_TOKEN }}
inputs: '{ "run_id": "${{ github.run_id }}", "version": "${{ needs.build-windows.outputs.version }}", "public_release": ${{ env.IS_PUBLIC_RELEASE }}, "store_artifacts": ${{ env.IS_TEST_INSTALLER }} }'
inputs: '{ "run_id": "${{ github.run_id }}", "version": "${{ needs.build-windows.outputs.version }}", "public_release": ${{ env.IS_TAG_BUILD }}, "store_artifacts": ${{ env.IS_RELEASE_BRANCH }} }'
ref: main
wait-for-completion: true
wait-for-completion-interval: 10s
@@ -88,6 +89,9 @@ jobs:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
- name: ⚒️ Run GitVersion on Linux
run: ./build.sh build-server-version
- name: ⚒️ Run tests on Linux
run: ./build.sh test-only
@@ -101,5 +105,4 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Push to nuget.org
if: (github.ref_type == 'tag')
run: dotnet nuget push output/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{secrets.CONNECTORS_NUGET_TOKEN }} --skip-duplicate
-119
View File
@@ -1,119 +0,0 @@
using GlobExpressions;
using Microsoft.Build.Construction;
using static SimpleExec.Command;
namespace Build;
public static class Affected
{
public static readonly string Root = Environment.CurrentDirectory;
public const string AFFECTED_PROJECT = "affected.proj";
private static IEnumerable<string> GetAffectedProjects()
{
var projFile = Path.Combine(Root, AFFECTED_PROJECT);
Console.WriteLine("Affected project file: " + projFile);
var project = ProjectRootElement.Open(projFile) ?? throw new InvalidOperationException();
var references = project.ItemGroups.SelectMany(x => x.Items).Where(x => x.ItemType == "ProjectReference");
foreach (var refe in references)
{
var referencePath = refe.Include[(Root.Length + 1)..];
referencePath = Path.GetDirectoryName(referencePath) ?? throw new InvalidOperationException();
if (Path.DirectorySeparatorChar != '/')
{
referencePath = referencePath.Replace(Path.DirectorySeparatorChar, '/');
}
yield return referencePath;
}
}
public static async Task<IEnumerable<string>> GetTestProjects()
{
await ComputeAffected();
var projFile = Path.Combine(Root, AFFECTED_PROJECT);
if (File.Exists(projFile))
{
var references = GetAffectedProjects();
return references.Where(x => x.Contains("Tests"));
}
return Glob.Files(Root, "**/*.Tests.csproj");
}
public static async Task<ProjectGroup[]> GetAffectedProjectGroups()
{
await ComputeAffected();
var projFile = Path.Combine(Root, AFFECTED_PROJECT);
if (File.Exists(projFile))
{
var references = GetAffectedProjects().ToList();
var groups = new List<ProjectGroup>();
foreach (var projectGroup in Consts.ProjectGroups)
{
foreach (var referencePath in references)
{
if (projectGroup.Projects.Any(x => x.ProjectPath.Contains(referencePath)))
{
groups.Add(projectGroup);
break;
}
}
}
foreach (var group in groups)
{
Console.WriteLine("Affected project group being built: " + group.HostAppSlug);
}
if (groups.Count > 0)
{
return groups.ToArray();
}
}
Console.WriteLine("Using all project groups: " + string.Join(',', Consts.ProjectGroups));
return Consts.ProjectGroups;
}
private static bool s_affectedComputed;
public static async Task ComputeAffected()
{
if (s_affectedComputed)
{
return;
}
var currentTag = await Versions.GetCurrentTag();
var currentVersion = await Versions.ComputeVersion();
var lastTag = await Versions.GetPreviousTag(currentTag);
var lastVersion = await Versions.ComputePreviousVersion(currentTag);
Console.WriteLine($"Last tag: {lastTag}, Current tag: {currentTag}");
Console.WriteLine($"Last parsed version: {lastVersion}, Current parsed version: {currentVersion}");
var sort = currentVersion.CompareSortOrderTo(lastVersion);
if (sort == -1)
{
Console.WriteLine($"Current version {currentVersion} is less than: {lastVersion}");
s_affectedComputed = true;
return;
}
var majorEquals = currentVersion.Major == lastVersion.Major;
if (!majorEquals)
{
Console.WriteLine($"Current version {currentVersion} is not matching major version: {lastVersion}");
s_affectedComputed = true;
return;
}
//use tags no matter the version if major versions match
var (currentCommit, _) = await ReadAsync("git", $"rev-list -n 1 {currentTag}");
var (lastCommit, _) = await ReadAsync("git", $"rev-list -n 1 {lastTag}");
await RunAsync("dotnet", $"affected -v --from {currentCommit.Trim()} --to {lastCommit.Trim()}", Root);
s_affectedComputed = true;
}
}
-1
View File
@@ -10,7 +10,6 @@
<PackageReference Include="Bullseye" />
<PackageReference Include="Glob" />
<PackageReference Include="Microsoft.Build" />
<PackageReference Include="Semver" />
<PackageReference Include="SimpleExec" />
</ItemGroup>
</Project>
+2 -2
View File
@@ -4,7 +4,7 @@ public static class Consts
{
public static readonly string[] Solutions = ["Speckle.Connectors.sln"];
public static readonly ProjectGroup[] ProjectGroups =
public static readonly InstallerProject[] InstallerManifests =
{
new("arcgis", [new("Connectors/ArcGIS/Speckle.Connectors.ArcGIS3", "net6.0-windows")]),
new(
@@ -69,7 +69,7 @@ public static class Consts
};
}
public readonly record struct ProjectGroup(string HostAppSlug, IReadOnlyList<InstallerAsset> Projects)
public readonly record struct InstallerProject(string HostAppSlug, IReadOnlyList<InstallerAsset> Projects)
{
public override string ToString() => $"{HostAppSlug}";
}
+76 -80
View File
@@ -12,12 +12,13 @@ const string TEST = "test";
const string TEST_ONLY = "test-only";
const string FORMAT = "format";
const string ZIP = "zip";
const string VERSION = "version";
const string RESTORE_TOOLS = "restore-tools";
const string BUILD_SERVER_VERSION = "build-server-version";
const string CLEAN_LOCKS = "clean-locks";
const string CHECK_SOLUTIONS = "check-solutions";
const string DEEP_CLEAN = "deep-clean";
const string DEEP_CLEAN_LOCAL = "deep-clean-local";
const string DETECT_AFFECTED = "detect-affected";
//need to pass arguments
/*var arguments = new List<string>();
@@ -33,14 +34,14 @@ void Build(string solution, string configuration)
Console.WriteLine();
Console.WriteLine($"Building solution '{solution}' as '{configuration}'");
Console.WriteLine();
Run("dotnet", $"build \".\\{solution}\" --configuration {configuration} --no-restore");
Run("dotnet", $"build .\\{solution} --configuration {configuration} --no-restore");
}
void Restore(string solution)
{
Console.WriteLine();
Console.WriteLine($"Restoring solution '{solution}'");
Console.WriteLine();
Run("dotnet", $"restore \".\\{solution}\" --no-cache");
Run("dotnet", $"restore .\\{solution} --no-cache");
}
void DeleteFiles(string pattern)
{
@@ -125,22 +126,21 @@ Target(
);
Target(
RESTORE_TOOLS,
() =>
VERSION,
async () =>
{
Run("dotnet", "tool restore");
var (output, _) = await ReadAsync("dotnet", "minver -v w");
output = output.Trim();
Console.WriteLine($"Version: {output}");
Run("echo", $"\"version={output}\" >> $GITHUB_OUTPUT");
}
);
Target(
DETECT_AFFECTED,
DependsOn(RESTORE_TOOLS),
async () =>
RESTORE_TOOLS,
() =>
{
foreach (var group in await Affected.GetAffectedProjectGroups())
{
Console.WriteLine("Affected project group being built: " + group.HostAppSlug);
}
Run("dotnet", "tool restore");
}
);
@@ -155,14 +155,20 @@ Target(
Target(
RESTORE,
DependsOn(FORMAT, DETECT_AFFECTED),
DependsOn(FORMAT),
Consts.Solutions,
async s =>
s =>
{
var version = await Versions.ComputeVersion();
var fileVersion = await Versions.ComputeFileVersion();
Console.WriteLine($"Restoring: {s} - Version: {version} & {fileVersion}");
await RunAsync("dotnet", $"restore \"{s}\" --locked-mode");
Run("dotnet", $"restore {s} --locked-mode");
}
);
Target(
BUILD_SERVER_VERSION,
DependsOn(RESTORE_TOOLS),
() =>
{
Run("dotnet", "tool run dotnet-gitversion /output json /output buildserver");
}
);
@@ -170,14 +176,14 @@ Target(
BUILD,
DependsOn(RESTORE),
Consts.Solutions,
async s =>
s =>
{
var version = await Versions.ComputeVersion();
var fileVersion = await Versions.ComputeFileVersion();
Console.WriteLine($"Restoring: {s} - Version: {version} & {fileVersion}");
await RunAsync(
var version = Environment.GetEnvironmentVariable("GitVersion_FullSemVer") ?? "3.0.0-localBuild";
var fileVersion = Environment.GetEnvironmentVariable("GitVersion_AssemblySemFileVer") ?? "3.0.0.0";
Console.WriteLine($"Version: {version} & {fileVersion}");
Run(
"dotnet",
$"build \"{s}\" -c Release --no-restore -warnaserror -p:Version={version} -p:FileVersion={fileVersion} -v:m"
$"build {s} -c Release --no-restore -warnaserror -p:Version={version} -p:FileVersion={fileVersion} -v:m"
);
}
);
@@ -187,26 +193,23 @@ Target(CHECK_SOLUTIONS, Solutions.CompareConnectorsToLocal);
Target(
TEST,
DependsOn(BUILD, CHECK_SOLUTIONS),
async () =>
Glob.Files(".", "**/*.Tests.csproj"),
file =>
{
foreach (var s in await Affected.GetTestProjects())
{
await RunAsync("dotnet", $"test \"{s}\" -c Release --no-build --no-restore --verbosity=minimal");
}
Run("dotnet", $"test {file} -c Release --no-build --no-restore --verbosity=minimal");
}
);
//all tests on purpose
Target(
TEST_ONLY,
DependsOn(FORMAT),
Glob.Files(".", "**/*.Tests.csproj"),
file =>
{
Run("dotnet", $"build \"{file}\" -c Release --no-incremental");
Run("dotnet", $"build {file} -c Release --no-incremental");
Run(
"dotnet",
$"test \"{file}\" -c Release --no-build --verbosity=minimal /p:AltCover=true /p:AltCoverAttributeFilter=ExcludeFromCodeCoverage /p:AltCoverVerbosity=Warning"
$"test {file} -c Release --no-build --verbosity=minimal /p:AltCover=true /p:AltCoverAttributeFilter=ExcludeFromCodeCoverage /p:AltCoverVerbosity=Warning"
);
}
);
@@ -215,20 +218,20 @@ Target(
BUILD_LINUX,
DependsOn(FORMAT),
Glob.Files(".", "**/Speckle.Importers.Ifc.csproj"),
async file =>
file =>
{
await RunAsync("dotnet", $"restore \"{file}\" --locked-mode");
var version = await Versions.ComputeVersion();
var fileVersion = await Versions.ComputeFileVersion();
Run("dotnet", $"restore {file} --locked-mode");
var version = Environment.GetEnvironmentVariable("GitVersion_FullSemVer") ?? "3.0.0-localBuild";
var fileVersion = Environment.GetEnvironmentVariable("GitVersion_AssemblySemFileVer") ?? "3.0.0.0";
Console.WriteLine($"Version: {version} & {fileVersion}");
await RunAsync(
Run(
"dotnet",
$"build \"{file}\" -c Release --no-restore -warnaserror -p:Version={version} -p:FileVersion={fileVersion} -v:m"
$"build {file} -c Release --no-restore -warnaserror -p:Version={version} -p:FileVersion={fileVersion} -v:m"
);
await RunAsync(
RunAsync(
"dotnet",
$"pack \"{file}\" -c Release -o output --no-build -p:Version={version} -p:FileVersion={fileVersion} -v:m"
$"pack {file} -c Release -o output --no-build -p:Version={version} -p:FileVersion={fileVersion} -v:m"
);
}
);
@@ -236,54 +239,47 @@ Target(
Target(
ZIP,
DependsOn(TEST),
async () =>
Consts.InstallerManifests,
x =>
{
var version = await Versions.ComputeVersion();
foreach (var group in await Affected.GetAffectedProjectGroups())
var outputDir = Path.Combine(".", "output");
var slugDir = Path.Combine(outputDir, x.HostAppSlug);
Directory.CreateDirectory(outputDir);
Directory.CreateDirectory(slugDir);
foreach (var asset in x.Projects)
{
Console.WriteLine($"Zipping: {group.HostAppSlug} as {version}");
var outputDir = Path.Combine(".", "output");
var slugDir = Path.Combine(outputDir, group.HostAppSlug);
Directory.CreateDirectory(outputDir);
Directory.CreateDirectory(slugDir);
foreach (var asset in group.Projects)
var fullPath = Path.Combine(".", asset.ProjectPath, "bin", "Release", asset.TargetName);
if (!Directory.Exists(fullPath))
{
var fullPath = Path.Combine(".", asset.ProjectPath, "bin", "Release", asset.TargetName);
if (!Directory.Exists(fullPath))
{
throw new InvalidOperationException("Could not find: " + fullPath);
}
var assetName = Path.GetFileName(asset.ProjectPath);
var connectorDir = Path.Combine(slugDir, assetName);
Directory.CreateDirectory(connectorDir);
foreach (var directory in Directory.EnumerateDirectories(fullPath, "*", SearchOption.AllDirectories))
{
Directory.CreateDirectory(directory.Replace(fullPath, connectorDir));
}
foreach (var file in Directory.EnumerateFiles(fullPath, "*", SearchOption.AllDirectories))
{
Console.WriteLine(file);
File.Copy(file, file.Replace(fullPath, connectorDir), true);
}
throw new InvalidOperationException("Could not find: " + fullPath);
}
var outputPath = Path.Combine(outputDir, $"{group.HostAppSlug}.zip");
File.Delete(outputPath);
Console.WriteLine($"Zipping: '{slugDir}' to '{outputPath}'");
ZipFile.CreateFromDirectory(slugDir, outputPath);
var assetName = Path.GetFileName(asset.ProjectPath);
var connectorDir = Path.Combine(slugDir, assetName);
Directory.CreateDirectory(connectorDir);
foreach (var directory in Directory.EnumerateDirectories(fullPath, "*", SearchOption.AllDirectories))
{
Directory.CreateDirectory(directory.Replace(fullPath, connectorDir));
}
foreach (var file in Directory.EnumerateFiles(fullPath, "*", SearchOption.AllDirectories))
{
Console.WriteLine(file);
File.Copy(file, file.Replace(fullPath, connectorDir), true);
}
}
string githubEnv = Environment.GetEnvironmentVariable("GITHUB_ENV") ?? "Unset";
Console.WriteLine($"GITHUB_ENV: {githubEnv}");
File.AppendAllText(githubEnv, $"SPECKLE_VERSION={version}{Environment.NewLine}");
var outputPath = Path.Combine(outputDir, $"{x.HostAppSlug}.zip");
File.Delete(outputPath);
Console.WriteLine($"Zipping: '{slugDir}' to '{outputPath}'");
ZipFile.CreateFromDirectory(slugDir, outputPath);
// Directory.Delete(slugDir, true);
}
);
Target("default", DependsOn(TEST), () => Console.WriteLine("Done!"));
Target("default", DependsOn(FORMAT, ZIP), () => Console.WriteLine("Done!"));
await RunTargetsAndExitAsync(args).ConfigureAwait(true);
-79
View File
@@ -1,79 +0,0 @@
using Semver;
using static SimpleExec.Command;
namespace Build;
public static class Versions
{
private static string? s_currentTag;
private static SemVersion? s_currentVersion;
public static async Task<string> GetCurrentTag()
{
if (s_currentTag is not null)
{
return s_currentTag;
}
//finds current tag or makes one
var (currentTag, _) = await ReadAsync("git", "describe --tags");
currentTag = currentTag.Trim();
s_currentTag = currentTag;
return s_currentTag;
}
public static async Task<SemVersion> ComputeVersion()
{
if (s_currentVersion is not null)
{
return s_currentVersion;
}
var currentTag = await GetCurrentTag();
if (!SemVersion.TryParse(currentTag, SemVersionStyles.AllowLowerV, out var currentVersion))
{
throw new InvalidOperationException($"Could not parse version: '{currentTag}'");
}
s_currentVersion = currentVersion;
return s_currentVersion;
}
private static string? s_currentFileVersion;
public static async Task<string> ComputeFileVersion()
{
if (s_currentFileVersion is not null)
{
return s_currentFileVersion;
}
var currentVersion = await ComputeVersion();
s_currentFileVersion = currentVersion.WithoutPrereleaseOrMetadata() + ".0";
return s_currentFileVersion;
}
public static async Task<string> GetPreviousTag(string currentTag)
{
//finds a tag starting with current tag and adds no abbrevation
var (lastTag, _) = await ReadAsync("git", $"describe --abbrev=0 --tags {currentTag}^");
lastTag = lastTag.Trim();
return lastTag;
}
private static SemVersion? s_previousVersion;
public static async Task<SemVersion> ComputePreviousVersion(string currentTag)
{
if (s_previousVersion is not null)
{
return s_previousVersion;
}
var lastTag = await GetPreviousTag(currentTag);
if (!SemVersion.TryParse(lastTag, SemVersionStyles.AllowLowerV, out var lastVersion))
{
throw new InvalidOperationException($"Could not parse version: '{lastTag}'");
}
s_previousVersion = lastVersion;
return s_previousVersion;
}
}
-14
View File
@@ -53,15 +53,6 @@
"resolved": "1.14.1",
"contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ=="
},
"Semver": {
"type": "Direct",
"requested": "[3.0.0, )",
"resolved": "3.0.0",
"contentHash": "9jZCicsVgTebqkAujRWtC9J1A5EQVlu0TVKHcgoCuv345ve5DYf4D1MjhKEnQjdRZo6x/vdv6QQrYFs7ilGzLA==",
"dependencies": {
"Microsoft.Extensions.Primitives": "5.0.1"
}
},
"SimpleExec": {
"type": "Direct",
"requested": "[12.0.0, )",
@@ -84,11 +75,6 @@
"resolved": "8.0.0",
"contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ=="
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "5.0.1",
"contentHash": "5WPSmL4YeP7eW+Vc8XZ4DwjYWBAiSwDV9Hm63JJWcz1Ie3Xjv4KuJXzgCstj48LkLfVCYa7mLcx7y+q6yqVvtw=="
},
"Microsoft.NET.StringTools": {
"type": "Transitive",
"resolved": "17.11.4",
@@ -67,8 +67,6 @@ public class BasicConnectorBinding : IBasicConnectorBinding
public void RemoveModel(ModelCard model) => _store.RemoveModel(model);
public void RemoveModels(List<ModelCard> models) => _store.RemoveModels(models);
public async Task HighlightObjects(IReadOnlyList<string> objectIds)
{
await HighlightObjectsOnView(objectIds.Select(x => new ObjectID(x)).ToList());
@@ -184,7 +184,6 @@ public class ArcGISColorUnpacker
if (StoredColor is int existingColorProxyId)
{
AddObjectIdToColorProxyCache(rowApplicationId, existingColorProxyId);
return;
}
// get the color from the renderer and row
@@ -221,21 +221,14 @@
"resolved": "4.5.1",
"contentHash": "Zh8t8oqolRaFa9vmOZfdQm/qKejdqz0J9kr7o2Fu0vPeoH3BL1EOXipKWwkWtLT1JPzjByrF19fGuFlNbmPpiw=="
},
"speckle.common.meshtriangulation": {
"type": "Project",
"dependencies": {
"LibTessDotNet": "[1.1.15, )",
"Speckle.DoubleNumerics": "[4.1.0, )"
}
},
"speckle.connectors.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -243,8 +236,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -261,7 +254,6 @@
"type": "Project",
"dependencies": {
"Esri.ArcGISPro.Extensions30": "[3.2.0.49743, )",
"Speckle.Common.MeshTriangulation": "[1.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
@@ -269,15 +261,9 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"LibTessDotNet": {
"type": "CentralTransitive",
"requested": "[1.1.15, )",
"resolved": "1.1.15",
"contentHash": "KuA7N3Nv/lIeawJdQBQJR6oqWD9KETHLbWzBqapwFs+Tby+R5I4crkKujKMm5bXcSuFZ8LNtflFQVadsWCbBjg=="
},
"Microsoft.Extensions.DependencyInjection": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
@@ -313,18 +299,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -334,14 +320,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
},
"net6.0-windows7.0/win-x64": {
@@ -11,7 +11,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2022.0.2" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2022.0.2" />
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -294,7 +294,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -338,18 +338,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -359,14 +359,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -11,7 +11,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" />
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -294,7 +294,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -338,18 +338,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -359,14 +359,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -11,7 +11,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" />
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -295,7 +295,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -339,18 +339,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -360,14 +360,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -13,7 +13,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2025.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2025.0.0" />
<FrameworkReference Include="Microsoft.WindowsDesktop.App"/>
</ItemGroup>
<ItemGroup>
@@ -215,9 +215,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -225,8 +225,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -251,7 +251,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -295,18 +295,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
@@ -315,14 +315,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
},
"net8.0-windows7.0/win-x64": {
@@ -79,8 +79,6 @@ public class AutocadBasicConnectorBinding : IBasicConnectorBinding
public void RemoveModel(ModelCard model) => _store.RemoveModel(model);
public void RemoveModels(List<ModelCard> models) => _store.RemoveModels(models);
public async Task HighlightObjects(IReadOnlyList<string> objectIds)
{
// POC: Will be addressed to move it into AutocadContext!
@@ -1,119 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Common.Cancellation;
using Speckle.Connectors.Common.Operations;
using Speckle.Connectors.Common.Threading;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Logging;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card;
using Speckle.Sdk;
namespace Speckle.Connectors.Autocad.Bindings;
public abstract class AutocadReceiveBaseBinding : IReceiveBinding
{
public string Name => "receiveBinding";
public IBrowserBridge Parent { get; }
private readonly DocumentModelStore _store;
private readonly ICancellationManager _cancellationManager;
private readonly IServiceProvider _serviceProvider;
private readonly IOperationProgressManager _operationProgressManager;
private readonly ILogger<AutocadReceiveBinding> _logger;
private readonly ISpeckleApplication _speckleApplication;
private readonly IThreadContext _threadContext;
private ReceiveBindingUICommands Commands { get; }
protected AutocadReceiveBaseBinding(
DocumentModelStore store,
IBrowserBridge parent,
ICancellationManager cancellationManager,
IServiceProvider serviceProvider,
IOperationProgressManager operationProgressManager,
ILogger<AutocadReceiveBinding> logger,
ISpeckleApplication speckleApplication,
IThreadContext threadContext
)
{
_store = store;
_cancellationManager = cancellationManager;
_serviceProvider = serviceProvider;
_operationProgressManager = operationProgressManager;
_logger = logger;
_speckleApplication = speckleApplication;
_threadContext = threadContext;
Parent = parent;
Commands = new ReceiveBindingUICommands(parent);
}
protected abstract void InitializeSettings(IServiceProvider serviceProvider);
public void CancelReceive(string modelCardId) => _cancellationManager.CancelOperation(modelCardId);
public async Task Receive(string modelCardId) =>
await _threadContext.RunOnMainAsync(async () => await ReceiveInternal(modelCardId));
private async Task ReceiveInternal(string modelCardId)
{
using var scope = _serviceProvider.CreateScope();
InitializeSettings(scope.ServiceProvider);
try
{
// Get receiver card
if (_store.GetModelById(modelCardId) is not ReceiverModelCard modelCard)
{
// Handle as GLOBAL ERROR at BrowserBridge
throw new InvalidOperationException("No download model card was found.");
}
using var cancellationItem = _cancellationManager.GetCancellationItem(modelCardId);
// Disable document activation (document creation and document switch)
// Not disabling results in DUI model card being out of sync with the active document
// The DocumentActivated event isn't usable probably because it is pushed to back of main thread queue
Application.DocumentManager.DocumentActivationEnabled = false;
// Receive host objects
var operationResults = await scope
.ServiceProvider.GetRequiredService<ReceiveOperation>()
.Execute(
modelCard.GetReceiveInfo(_speckleApplication.Slug),
_operationProgressManager.CreateOperationProgressEventHandler(Parent, modelCardId, cancellationItem.Token),
cancellationItem.Token
);
await Commands.SetModelReceiveResult(
modelCardId,
operationResults.BakedObjectIds,
operationResults.ConversionResults
);
}
catch (OperationCanceledException)
{
// SWALLOW -> UI handles it immediately, so we do not need to handle anything for now!
// Idea for later -> when cancel called, create promise from UI to solve it later with this catch block.
// So have 3 state on UI -> Cancellation clicked -> Cancelling -> Cancelled
return;
}
catch (Exception ex) when (!ex.IsFatal()) // UX reasons - we will report operation exceptions as model card error. We may change this later when we have more exception documentation
{
_logger.LogModelCardHandledError(ex);
await Commands.SetModelError(modelCardId, ex);
}
finally
{
// reenable document activation
Application.DocumentManager.DocumentActivationEnabled = true;
// regenerate doc to flush graphics, sometimes some objects (ellipses, nurbs curves) do not appear fully visible after receive.
// Adding a regen (must be run on main thread) here, but it doesn't seem to work:
// it's run on main thread, tried sending the "regen" string to execute, also tried regen after every object bake, but still can't fix.
// the objects should appear visible if you manually call the "regen" command after the operation finishes, or click on a view on the view cube which also calls regen.
Application.DocumentManager.CurrentDocument.Editor.Regen();
}
}
}
@@ -1,19 +1,34 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Common.Cancellation;
using Speckle.Connectors.Common.Operations;
using Speckle.Connectors.Common.Threading;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Logging;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card;
using Speckle.Converters.Autocad;
using Speckle.Converters.Common;
using Speckle.Sdk;
namespace Speckle.Connectors.Autocad.Bindings;
public sealed class AutocadReceiveBinding : AutocadReceiveBaseBinding
public sealed class AutocadReceiveBinding : IReceiveBinding
{
public string Name => "receiveBinding";
public IBrowserBridge Parent { get; }
private readonly DocumentModelStore _store;
private readonly ICancellationManager _cancellationManager;
private readonly IServiceProvider _serviceProvider;
private readonly IOperationProgressManager _operationProgressManager;
private readonly ILogger<AutocadReceiveBinding> _logger;
private readonly IAutocadConversionSettingsFactory _autocadConversionSettingsFactory;
private readonly ISpeckleApplication _speckleApplication;
private readonly IThreadContext _threadContext;
private ReceiveBindingUICommands Commands { get; }
public AutocadReceiveBinding(
DocumentModelStore store,
@@ -26,24 +41,77 @@ public sealed class AutocadReceiveBinding : AutocadReceiveBaseBinding
ISpeckleApplication speckleApplication,
IThreadContext threadContext
)
: base(
store,
parent,
cancellationManager,
serviceProvider,
operationProgressManager,
logger,
speckleApplication,
threadContext
)
{
_store = store;
_cancellationManager = cancellationManager;
_serviceProvider = serviceProvider;
_operationProgressManager = operationProgressManager;
_logger = logger;
_autocadConversionSettingsFactory = autocadConversionSettingsFactory;
_speckleApplication = speckleApplication;
_threadContext = threadContext;
Parent = parent;
Commands = new ReceiveBindingUICommands(parent);
}
protected override void InitializeSettings(IServiceProvider serviceProvider)
public void CancelReceive(string modelCardId) => _cancellationManager.CancelOperation(modelCardId);
public async Task Receive(string modelCardId) =>
await _threadContext.RunOnMainAsync(async () => await ReceiveInternal(modelCardId));
public async Task ReceiveInternal(string modelCardId)
{
serviceProvider
.GetRequiredService<IConverterSettingsStore<AutocadConversionSettings>>()
using var scope = _serviceProvider.CreateScope();
scope
.ServiceProvider.GetRequiredService<IConverterSettingsStore<AutocadConversionSettings>>()
.Initialize(_autocadConversionSettingsFactory.Create(Application.DocumentManager.CurrentDocument));
try
{
// Get receiver card
if (_store.GetModelById(modelCardId) is not ReceiverModelCard modelCard)
{
// Handle as GLOBAL ERROR at BrowserBridge
throw new InvalidOperationException("No download model card was found.");
}
using var cancellationItem = _cancellationManager.GetCancellationItem(modelCardId);
// Disable document activation (document creation and document switch)
// Not disabling results in DUI model card being out of sync with the active document
// The DocumentActivated event isn't usable probably because it is pushed to back of main thread queue
Application.DocumentManager.DocumentActivationEnabled = false;
// Receive host objects
var operationResults = await scope
.ServiceProvider.GetRequiredService<ReceiveOperation>()
.Execute(
modelCard.GetReceiveInfo(_speckleApplication.Slug),
_operationProgressManager.CreateOperationProgressEventHandler(Parent, modelCardId, cancellationItem.Token),
cancellationItem.Token
);
await Commands.SetModelReceiveResult(
modelCardId,
operationResults.BakedObjectIds,
operationResults.ConversionResults
);
}
catch (OperationCanceledException)
{
// SWALLOW -> UI handles it immediately, so we do not need to handle anything for now!
// Idea for later -> when cancel called, create promise from UI to solve it later with this catch block.
// So have 3 state on UI -> Cancellation clicked -> Cancelling -> Cancelled
return;
}
catch (Exception ex) when (!ex.IsFatal()) // UX reasons - we will report operation exceptions as model card error. We may change this later when we have more exception documentation
{
_logger.LogModelCardHandledError(ex);
await Commands.SetModelError(modelCardId, ex);
}
finally
{
// reenable document activation
Application.DocumentManager.DocumentActivationEnabled = true;
}
}
}
@@ -48,7 +48,7 @@ public abstract class AutocadSendBaseBinding : ISendBinding
/// As to why a concurrent dictionary, it's because it's the cheapest/easiest way to do so.
/// https://stackoverflow.com/questions/18922985/concurrent-hashsett-in-net-framework
/// </summary>
private ConcurrentBag<string> ChangedObjectIds { get; set; } = new();
private ConcurrentDictionary<string, byte> ChangedObjectIds { get; set; } = new();
protected AutocadSendBaseBinding(
DocumentModelStore store,
@@ -114,20 +114,21 @@ public abstract class AutocadSendBaseBinding : ISendBinding
private void OnChangeChangedObjectIds(DBObject dBObject)
{
ChangedObjectIds.Add(dBObject.GetSpeckleApplicationId());
_idleManager.SubscribeToIdle(nameof(RunExpirationChecks), async () => await RunExpirationChecks());
ChangedObjectIds[dBObject.GetSpeckleApplicationId()] = 1;
_idleManager.SubscribeToIdle(nameof(AutocadSendBinding), async () => await RunExpirationChecks());
}
private async Task RunExpirationChecks()
{
var senders = _store.GetSenders();
string[] objectIdsList = ChangedObjectIds.Keys.ToArray();
List<string> expiredSenderIds = new();
_sendConversionCache.EvictObjects(ChangedObjectIds);
_sendConversionCache.EvictObjects(objectIdsList);
foreach (SenderModelCard modelCard in senders)
{
var intersection = modelCard.SendFilter.NotNull().RefreshObjectIds().Intersect(ChangedObjectIds).ToList();
var intersection = modelCard.SendFilter.NotNull().RefreshObjectIds().Intersect(objectIdsList).ToList();
bool isExpired = intersection.Count != 0;
if (isExpired)
{
@@ -83,7 +83,7 @@ public class AutocadHostObjectBuilder(
colorBaker.ParseColors(unpackedRoot.ColorProxies, onOperationProgressed);
}
// 4 - Convert atomic objects
// 5 - Convert atomic objects
HashSet<ReceiveConversionResult> results = new();
HashSet<string> bakedObjectIds = new();
Dictionary<string, IReadOnlyCollection<Entity>> applicationIdMap = new();
@@ -116,7 +116,7 @@ public class AutocadHostObjectBuilder(
}
}
// 5 - Convert instances
// 6 - Convert instances
var (createdInstanceIds, consumedObjectIds, instanceConversionResults) = instanceBaker.BakeInstances(
instanceComponentsWithPath,
applicationIdMap,
@@ -129,7 +129,7 @@ public class AutocadHostObjectBuilder(
results.RemoveWhere(result => result.ResultId != null && consumedObjectIds.Contains(result.ResultId));
results.UnionWith(instanceConversionResults);
// 6 - Create groups
// 7 - Create groups
if (unpackedRoot.GroupProxies != null)
{
IReadOnlyCollection<ReceiveConversionResult> groupResults = groupBaker.CreateGroups(
@@ -9,7 +9,6 @@
<Import_RootNamespace>Speckle.Connectors.AutocadShared</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)Bindings\AutocadReceiveBaseBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bindings\AutocadSelectionBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bindings\AutocadReceiveBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bindings\AutocadSendBinding.cs" />
@@ -10,8 +10,8 @@
<StartProgram>$(ProgramW6432)\Autodesk\AutoCAD $(Civil3DVersion)\acad.exe</StartProgram>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2022.0.2" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Civil3D.API" VersionOverride="2022.0.2" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" />
<PackageReference Include="Speckle.Civil3D.API" />
</ItemGroup>
<ItemGroup>
@@ -268,9 +268,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -278,8 +278,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -304,7 +304,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -348,18 +348,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -369,14 +369,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -11,8 +11,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Civil3D.API" VersionOverride="2023.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" />
<PackageReference Include="Speckle.Civil3D.API" VersionOverride="2023.0.0" />
</ItemGroup>
<ItemGroup>
@@ -268,9 +268,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -278,8 +278,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -304,7 +304,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -348,18 +348,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -369,14 +369,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -11,8 +11,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Civil3D.API" VersionOverride="2024.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" />
<PackageReference Include="Speckle.Civil3D.API" VersionOverride="2024.0.0" />
</ItemGroup>
<ItemGroup>
@@ -268,9 +268,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -278,8 +278,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -304,7 +304,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -348,18 +348,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -369,14 +369,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -13,8 +13,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2025.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Civil3d.API" VersionOverride="2025.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2025.0.0" />
<PackageReference Include="Speckle.Civil3d.API" VersionOverride="2025.0.0" />
<FrameworkReference Include="Microsoft.WindowsDesktop.App" />
</ItemGroup>
<ItemGroup>
@@ -224,9 +224,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -234,8 +234,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -261,7 +261,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -305,18 +305,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
@@ -325,14 +325,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
},
"net8.0-windows7.0/win-x64": {
@@ -1,60 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Autocad.Bindings;
using Speckle.Connectors.Common.Cancellation;
using Speckle.Connectors.Common.Threading;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Models;
using Speckle.Converters.Autocad;
using Speckle.Converters.Civil3dShared;
using Speckle.Converters.Common;
using Speckle.Sdk;
namespace Speckle.Connectors.Civil3dShared.Bindings;
public sealed class Civil3dReceiveBinding : AutocadReceiveBaseBinding
{
private readonly ICivil3dConversionSettingsFactory _civil3dConversionSettingsFactory;
private readonly IAutocadConversionSettingsFactory _autocadConversionSettingsFactory;
public Civil3dReceiveBinding(
DocumentModelStore store,
IBrowserBridge parent,
ICancellationManager cancellationManager,
IServiceProvider serviceProvider,
IOperationProgressManager operationProgressManager,
ILogger<AutocadReceiveBinding> logger,
ICivil3dConversionSettingsFactory civil3dConversionSettingsFactory,
IAutocadConversionSettingsFactory autocadConversionSettingsFactory,
ISpeckleApplication speckleApplication,
IThreadContext threadContext
)
: base(
store,
parent,
cancellationManager,
serviceProvider,
operationProgressManager,
logger,
speckleApplication,
threadContext
)
{
_civil3dConversionSettingsFactory = civil3dConversionSettingsFactory;
_autocadConversionSettingsFactory = autocadConversionSettingsFactory;
}
// POC: we're registering the conversion settings for autocad here because we need the autocad conversion settings to be able to use the autocad typed converters.
// POC: We need a separate receive binding for civil3d due to using a different unit converter (needed for conversion settings construction)
protected override void InitializeSettings(IServiceProvider serviceProvider)
{
serviceProvider
.GetRequiredService<IConverterSettingsStore<Civil3dConversionSettings>>()
.Initialize(_civil3dConversionSettingsFactory.Create(Application.DocumentManager.CurrentDocument));
serviceProvider
.GetRequiredService<IConverterSettingsStore<AutocadConversionSettings>>()
.Initialize(_autocadConversionSettingsFactory.Create(Application.DocumentManager.CurrentDocument));
}
}
@@ -16,20 +16,16 @@ public static class Civil3dConnectorModule
public static void AddCivil3d(this IServiceCollection serviceCollection)
{
serviceCollection.AddAutocadBase();
// add send
serviceCollection.LoadSend();
// register civil specific send classes
serviceCollection.AddScoped<IRootObjectBuilder<AutocadRootObject>, Civil3dRootObjectBuilder>();
serviceCollection.AddSingleton<IBinding, Civil3dSendBinding>();
// add receive
serviceCollection.LoadReceive();
serviceCollection.AddSingleton<IBinding, Civil3dReceiveBinding>();
// automatically detects the Class:IClass interface pattern to register all generated interfaces
serviceCollection.AddMatchingInterfacesAsTransient(Assembly.GetExecutingAssembly());
// additional classes
serviceCollection.AddScoped<PropertySetDefinitionHandler>();
// automatically detects the Class:IClass interface pattern to register all generated interfaces
serviceCollection.AddMatchingInterfacesAsTransient(Assembly.GetExecutingAssembly());
}
}
@@ -50,6 +50,7 @@ public sealed class Civil3dRootObjectBuilder : AutocadRootObjectBaseBuilder
return (layer, autocadLayer);
}
// POC: probably will need to add Network proxies as well
public override void AddAdditionalProxiesToRoot(Collection rootObject)
{
rootObject[ProxyKeys.PROPERTYSET_DEFINITIONS] = _propertySetDefinitionHandler.Definitions;
@@ -9,13 +9,13 @@
<Import_RootNamespace>Speckle.Connectors.Civil3dShared</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)Bindings\Civil3dReceiveBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DependencyInjection\Civil3dConnectorModule.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Civil3dRootObjectBuilder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bindings\Civil3dSendBinding.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)DependencyInjection\" />
<Folder Include="$(MSBuildThisFileDirectory)Bindings\" />
<Folder Include="$(MSBuildThisFileDirectory)Operations\Send\" />
</ItemGroup>
</Project>
@@ -65,9 +65,6 @@ public class CsiSharedBasicConnectorBinding : IBasicConnectorBinding
public void RemoveModel(ModelCard model) =>
_topLevelExceptionHandler.CatchUnhandled(() => _threadContext.RunOnThread(() => _store.RemoveModel(model), true));
public void RemoveModels(List<ModelCard> models) =>
_topLevelExceptionHandler.CatchUnhandled(() => _threadContext.RunOnThread(() => _store.RemoveModels(models), true));
public Task HighlightModel(string modelCardId) => Task.CompletedTask;
public Task HighlightObjects(IReadOnlyList<string> objectIds) => Task.CompletedTask;
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -287,7 +287,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"speckle.converters.etabs21": {
@@ -337,18 +337,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -358,14 +358,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -215,9 +215,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -225,8 +225,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -243,7 +243,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"speckle.converters.etabs22": {
@@ -293,18 +293,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
@@ -313,14 +313,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -16,7 +16,7 @@
<ItemGroup>
<Reference Include="WindowsFormsIntegration"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2020.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2020.0.0"/>
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -287,7 +287,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"speckle.converters.navisworks2020": {
@@ -339,18 +339,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -360,14 +360,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
},
".NETFramework,Version=v4.8/win-x64": {
@@ -16,7 +16,7 @@
<ItemGroup>
<Reference Include="WindowsFormsIntegration"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2021.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2021.0.0"/>
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -287,7 +287,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"speckle.converters.navisworks2021": {
@@ -339,18 +339,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -360,14 +360,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
},
".NETFramework,Version=v4.8/win-x64": {
@@ -16,7 +16,7 @@
<ItemGroup>
<Reference Include="WindowsFormsIntegration"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2022.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2022.0.0"/>
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -287,7 +287,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"speckle.converters.navisworks2022": {
@@ -339,18 +339,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -360,14 +360,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
},
".NETFramework,Version=v4.8/win-x64": {
@@ -16,7 +16,7 @@
<ItemGroup>
<Reference Include="WindowsFormsIntegration"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2023.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2023.0.0"/>
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -287,7 +287,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"speckle.converters.navisworks2023": {
@@ -339,18 +339,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -360,14 +360,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
},
".NETFramework,Version=v4.8/win-x64": {
@@ -16,7 +16,7 @@
<ItemGroup>
<Reference Include="WindowsFormsIntegration"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2024.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2024.0.0"/>
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -287,7 +287,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"speckle.converters.navisworks2024": {
@@ -339,18 +339,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -360,14 +360,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
},
".NETFramework,Version=v4.8/win-x64": {
@@ -16,7 +16,7 @@
<ItemGroup>
<Reference Include="WindowsFormsIntegration"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2025.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2025.0.0"/>
<PackageReference Include="Microsoft.Web.WebView2" VersionOverride="1.0.2045.28" />
</ItemGroup>
@@ -265,9 +265,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -275,8 +275,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -293,7 +293,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"speckle.converters.navisworks2025": {
@@ -339,18 +339,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -360,14 +360,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
},
".NETFramework,Version=v4.8/win-x64": {
@@ -50,8 +50,6 @@ public class NavisworksBasicConnectorBinding : IBasicConnectorBinding
public void RemoveModel(ModelCard model) => _store.RemoveModel(model);
public void RemoveModels(List<ModelCard> models) => _store.RemoveModels(models);
public Task HighlightModel(string modelCardId) => Task.CompletedTask;
public async Task HighlightObjects(IReadOnlyList<string> objectIds) =>
@@ -26,7 +26,7 @@ public class NavisworksSelectionBinding : ISelectionBinding
}
private void OnSelectionChange(object? o, EventArgs eventArgs) =>
_idleManager.SubscribeToIdle(nameof(UpdateSelectionAsync), async () => await UpdateSelectionAsync());
_idleManager.SubscribeToIdle(nameof(NavisworksSelectionBinding), async () => await UpdateSelectionAsync());
private async Task UpdateSelectionAsync()
{
@@ -38,8 +38,7 @@ public class NavisworksSelectionBinding : ISelectionBinding
{
// Ensure there is an active document and a valid selection
var activeDocument = NavisworksApp.ActiveDocument;
var selection = activeDocument?.CurrentSelection?.SelectedItems ?? [];
if (selection.Count == 0)
if (activeDocument == null || activeDocument.CurrentSelection.SelectedItems.IsEmpty)
{
// Return an empty list if no valid selection exists
return new SelectionInfo([], "No selection available");
@@ -47,8 +46,8 @@ public class NavisworksSelectionBinding : ISelectionBinding
// Ensure only visible elements are processed by filtering using IsElementVisible
var selectedObjectsIds = new HashSet<string>(
selection
.Where(_selectionService.IsVisible) // Exclude hidden elements
activeDocument
.CurrentSelection.SelectedItems.Where(_selectionService.IsVisible) // Exclude hidden elements
.Select(_selectionService.GetModelItemPath) // Resolve to index paths
);
@@ -106,21 +106,9 @@ public class NavisworksSendBinding : ISendBinding
using var cancellationItem = _cancellationManager.GetCancellationItem(modelCardId);
var progress = _operationProgressManager.CreateOperationProgressEventHandler(
Parent,
modelCard.ModelCardId.NotNull(),
cancellationItem.Token
);
var navisworksModelItems = GetNavisworksModelItems(modelCard);
var navisworksModelItems = await GetNavisworksModelItems(modelCard, progress);
var sendResult = await ExecuteSendOperation(
scope,
modelCard,
navisworksModelItems,
progress,
cancellationItem.Token
);
var sendResult = await ExecuteSendOperation(scope, modelCard, navisworksModelItems, cancellationItem.Token);
await Commands.SetModelSendResult(modelCardId, sendResult.RootObjId, sendResult.ConversionResults);
}
@@ -135,16 +123,12 @@ public class NavisworksSendBinding : ISendBinding
_logger.LogModelCardHandledError(ex);
await Commands.SetModelError(modelCardId, ex);
}
finally
{
// otherwise the id of the operation persists on the cancellation manager and triggers 'Operations cancelled because of document swap!' message to UI.
_cancellationManager.CancelOperation(modelCardId);
}
}
private SenderModelCard GetModelCard(string modelCardId) =>
_store.GetModelById(modelCardId) as SenderModelCard
?? throw new InvalidOperationException("No publish model card was found.");
_store.GetModelById(modelCardId) is not SenderModelCard modelCard
? throw new InvalidOperationException("No publish model card was found.")
: modelCard;
private void InitializeConverterSettings(IServiceScope scope, SenderModelCard modelCard) =>
scope
@@ -159,43 +143,37 @@ public class NavisworksSendBinding : ISendBinding
)
);
private async Task<List<NAV.ModelItem>> GetNavisworksModelItems(
SenderModelCard modelCard,
IProgress<CardProgress> onOperationProgressed
)
private List<NAV.ModelItem> GetNavisworksModelItems(SenderModelCard modelCard)
{
var selectedPaths = modelCard.SendFilter.NotNull().RefreshObjectIds();
if (selectedPaths.Count == 0)
{
throw new SpeckleSendFilterException("No objects were found to convert. Please update your publish filter!");
}
var modelItems = selectedPaths
.Select(_selectionService.GetModelItemFromPath)
.SelectMany(_selectionService.GetGeometryNodes)
.Where(_selectionService.IsVisible)
.ToList();
if (modelItems.Count != 0)
{
return modelItems;
}
var convertHiddenElementsSetting =
modelCard.Settings!.FirstOrDefault(s => s.Id == "convertHiddenElements")?.Value as bool? ?? false;
var message = convertHiddenElementsSetting
? "No visible objects were found to convert. Please update your publish filter!"
: "No objects were found to convert. Please update your publish filter, or check items are visible!";
if (selectedPaths.Count == 0)
{
throw new SpeckleSendFilterException(message);
}
onOperationProgressed.Report(new CardProgress("Getting selection...", null));
await Task.CompletedTask;
var modelItems = new List<NAV.ModelItem>();
double count = 0;
foreach (var path in selectedPaths)
{
onOperationProgressed.Report(new CardProgress("Getting selection...", count / selectedPaths.Count));
await Task.CompletedTask;
var modelItem = _selectionService.GetModelItemFromPath(path);
modelItems.AddRange(_selectionService.GetGeometryNodes(modelItem).Where(_selectionService.IsVisible));
count++;
}
return modelItems.Count == 0 ? throw new SpeckleSendFilterException(message) : modelItems;
throw new SpeckleSendFilterException(message);
}
private async Task<SendOperationResult> ExecuteSendOperation(
IServiceScope scope,
SenderModelCard modelCard,
List<NAV.ModelItem> navisworksModelItems,
IProgress<CardProgress> onOperationProgressed,
CancellationToken token
) =>
await scope
@@ -203,7 +181,7 @@ public class NavisworksSendBinding : ISendBinding
.Execute(
navisworksModelItems,
modelCard.GetSendInfo(_speckleApplication.ApplicationAndVersion),
onOperationProgressed,
_operationProgressManager.CreateOperationProgressEventHandler(Parent, modelCard.ModelCardId.NotNull(), token),
token
);
@@ -1,31 +1,23 @@
using Speckle.InterfaceGenerator;
using static Speckle.Converter.Navisworks.Helpers.ElementSelectionHelper;
using static Speckle.Converter.Navisworks.Helpers.ElementSelectionHelper;
namespace Speckle.Connector.Navisworks.Services;
[GenerateAutoInterface]
public interface IElementSelectionService
{
string GetModelItemPath(NAV.ModelItem modelItem);
NAV.ModelItem GetModelItemFromPath(string path);
bool IsVisible(NAV.ModelItem modelItem);
IReadOnlyCollection<NAV.ModelItem> GetGeometryNodes(NAV.ModelItem modelItem);
}
public class ElementSelectionService : IElementSelectionService
{
private readonly Dictionary<Guid, bool> _visibleCache = new();
public string GetModelItemPath(NAV.ModelItem modelItem) => ResolveModelItemToIndexPath(modelItem);
public NAV.ModelItem GetModelItemFromPath(string path) => ResolveIndexPathToModelItem(path);
public bool IsVisible(NAV.ModelItem modelItem)
{
var key = modelItem.InstanceGuid;
if (_visibleCache.TryGetValue(key, out var isVisible))
{
return isVisible;
}
//same as ElementSelectionHelper.IsElementVisible
foreach (var item in modelItem.AncestorsAndSelf)
{
_visibleCache[item.InstanceGuid] = !item.IsHidden;
}
return _visibleCache[key];
}
public bool IsVisible(NAV.ModelItem modelItem) => IsElementVisible(modelItem);
public IEnumerable<NAV.ModelItem> GetGeometryNodes(NAV.ModelItem modelItem) => ResolveGeometryLeafNodes(modelItem);
public IReadOnlyCollection<NAV.ModelItem> GetGeometryNodes(NAV.ModelItem modelItem) =>
ResolveGeometryLeafNodes(modelItem);
}
@@ -77,10 +77,7 @@ public sealed class NavisworksDocumentEvents
_topLevelExceptionHandler.CatchUnhandled(
() =>
_idleManager.SubscribeToIdle(
nameof(ProcessModelStateChangeAsync),
async () => await ProcessModelStateChangeAsync()
)
_idleManager.SubscribeToIdle(nameof(NavisworksDocumentEvents), async () => await ProcessModelStateChangeAsync())
);
}
@@ -2,7 +2,6 @@
using Speckle.Connectors.DUI.Exceptions;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.DUI.Utils;
using Speckle.Converter.Navisworks.Constants;
namespace Speckle.Connector.Navisworks.Operations.Send.Filters;
@@ -14,9 +13,6 @@ public class NavisworksSavedSetsFilter : DiscriminatedObject, ISendFilterSelect
{
_selectionService = selectionService;
Items = [];
SelectedItems = [];
GetSavedSets();
}
@@ -40,15 +36,21 @@ public class NavisworksSavedSetsFilter : DiscriminatedObject, ISendFilterSelect
return objectIds;
}
var selectionSets = NavisworksApp.ActiveDocument.SelectionSets;
NAV.SavedItemCollection? selectionSets = NavisworksApp.ActiveDocument.SelectionSets.RootItem.Children;
foreach (var selectedSetGuid in SelectedItems)
{
var guid = new Guid(selectedSetGuid.Id);
var selectionSetItem =
selectionSets.ResolveGuid(guid)
?? throw new SpeckleSendFilterException($"Selection set with GUID {guid} not found.");
var index = selectionSets.IndexOfGuid(guid);
if (index == -1)
{
throw new SpeckleSendFilterException($"Selection set with GUID {guid} not found.");
}
var selectionSetItem = selectionSets[index];
var selectionSet = (NAV.SelectionSet)selectionSetItem;
if (selectionSet.HasSearch)
{
objectIds.AddRange(ResolveSearchSet(selectionSet.Search));
@@ -72,60 +74,34 @@ public class NavisworksSavedSetsFilter : DiscriminatedObject, ISendFilterSelect
private IEnumerable<string> ResolveSearchSet(NAV.Search selectionSetSearch) =>
selectionSetSearch
.FindAll(NavisworksApp.ActiveDocument, false)
.Where(_selectionService.IsVisible)
.Select(_selectionService.GetModelItemPath)
.Where(_selectionService.IsVisible) // Exclude hidden elements
.Select(_selectionService.GetModelItemPath) // Resolve to index paths
.ToList();
/// <summary>
/// Since it is called from constructor, it is re-called whenever UI calls SendBinding.GetSendFilters() on SendFilter dialog.
/// Do not change the behavior/scope of this class on send binding unless make sure the behavior is same. Otherwise, we might not be able to update list of saved sets.
/// Do not change the behavior/scope of this class on send binding unless make sure the behavior is same. Otherwise we might not be able to update list of saved sets.
/// </summary>
private void GetSavedSets()
{
List<NAV.SelectionSet> savedSetRecords = [];
CollectSavedSets(NavisworksApp.ActiveDocument.SelectionSets.RootItem, savedSetRecords);
List<NAV.SavedItem> savedSetRecords = NavisworksApp
.ActiveDocument.SelectionSets.RootItem.Children.Where(set => !set.IsGroup)
.ToList();
Items = savedSetRecords
.Select(setRecord =>
{
string hierarchicalName = BuildHierarchicalName(setRecord);
return new SendFilterSelectItem(setRecord.Guid.ToString(), hierarchicalName);
NAV.SavedItem? record = setRecord.CreateCopy();
string? name = record.DisplayName;
while (record.Parent != null)
{
name = record.Parent.DisplayName + "::" + name;
record = record.Parent;
}
return new SendFilterSelectItem(setRecord.Guid.ToString(), name);
})
.ToList();
}
private static void CollectSavedSets(NAV.SavedItem parentItem, List<NAV.SelectionSet> collectedSets)
{
if (!parentItem.IsGroup)
{
return;
}
foreach (NAV.SavedItem item in ((NAV.FolderItem)parentItem).Children)
{
if (item.IsGroup)
{
CollectSavedSets(item, collectedSets);
}
else
{
collectedSets.Add((NAV.SelectionSet)item);
}
}
}
private static string BuildHierarchicalName(NAV.SavedItem item)
{
var pathParts = new List<string> { item.DisplayName };
var current = item.Parent;
while (current != null && current != NavisworksApp.ActiveDocument.SelectionSets.RootItem)
{
pathParts.Insert(0, current.DisplayName);
current = current.Parent;
}
return string.Join(PathConstants.SET_SEPARATOR, pathParts);
}
}
@@ -287,9 +287,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -297,8 +297,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.logging": {
@@ -308,7 +308,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"speckle.converters.revit2022": {
@@ -353,11 +353,11 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Revit.API": {
@@ -368,9 +368,9 @@
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -380,14 +380,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -287,9 +287,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -297,8 +297,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.logging": {
@@ -308,7 +308,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"speckle.converters.revit2023": {
@@ -353,11 +353,11 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Revit.API": {
@@ -368,9 +368,9 @@
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -380,14 +380,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -287,9 +287,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -297,8 +297,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.logging": {
@@ -308,7 +308,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"speckle.converters.revit2024": {
@@ -353,11 +353,11 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Revit.API": {
@@ -368,9 +368,9 @@
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -380,14 +380,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -237,9 +237,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -247,8 +247,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.logging": {
@@ -258,7 +258,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"speckle.converters.revit2025": {
@@ -303,11 +303,11 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Revit.API": {
@@ -318,9 +318,9 @@
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
@@ -329,14 +329,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
},
"net8.0-windows7.0/win-x64": {
@@ -82,8 +82,6 @@ internal sealed class BasicConnectorBindingRevit : IBasicConnectorBinding
public void RemoveModel(ModelCard model) => _store.RemoveModel(model);
public void RemoveModels(List<ModelCard> models) => _store.RemoveModels(models);
public async Task HighlightModel(string modelCardId)
{
var model = _store.GetModelById(modelCardId);
@@ -72,10 +72,9 @@ internal sealed class RevitReceiveBinding : IReceiveBinding
.ServiceProvider.GetRequiredService<IConverterSettingsStore<RevitConversionSettings>>()
.Initialize(
_revitConversionSettingsFactory.Create(
DetailLevelType.Coarse, // TODO figure out
DetailLevelType.Coarse, //TODO figure out
null,
false,
true
false
)
);
// Receive host objects
@@ -1,3 +1,4 @@
using System.Collections.Concurrent;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.ExtensibleStorage;
using Microsoft.Extensions.DependencyInjection;
@@ -5,7 +6,6 @@ using Microsoft.Extensions.Logging;
using Speckle.Connectors.Common.Caching;
using Speckle.Connectors.Common.Cancellation;
using Speckle.Connectors.Common.Operations;
using Speckle.Connectors.Common.Threading;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Exceptions;
@@ -41,8 +41,6 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
private readonly IRevitConversionSettingsFactory _revitConversionSettingsFactory;
private readonly ISpeckleApplication _speckleApplication;
private readonly ITopLevelExceptionHandler _topLevelExceptionHandler;
private readonly LinkedModelHandler _linkedModelHandler;
private readonly IThreadContext _threadContext;
/// <summary>
/// Used internally to aggregate the changed objects' id. Note we're using a concurrent dictionary here as the expiry check method is not thread safe, and this was causing problems. See:
@@ -50,7 +48,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
/// As to why a concurrent dictionary, it's because it's the cheapest/easiest way to do so.
/// https://stackoverflow.com/questions/18922985/concurrent-hashsett-in-net-framework
/// </summary>
private ConcurrentHashSet<ElementId> ChangedObjectIds { get; set; } = new();
private ConcurrentDictionary<ElementId, byte> ChangedObjectIds { get; set; } = new();
public RevitSendBinding(
IAppIdleManager idleManager,
@@ -66,9 +64,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
ElementUnpacker elementUnpacker,
IRevitConversionSettingsFactory revitConversionSettingsFactory,
ISpeckleApplication speckleApplication,
ITopLevelExceptionHandler topLevelExceptionHandler,
LinkedModelHandler linkedModelHandler,
IThreadContext threadContext
ITopLevelExceptionHandler topLevelExceptionHandler
)
: base("sendBinding", bridge)
{
@@ -85,8 +81,6 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
_revitConversionSettingsFactory = revitConversionSettingsFactory;
_speckleApplication = speckleApplication;
_topLevelExceptionHandler = topLevelExceptionHandler;
_linkedModelHandler = linkedModelHandler;
_threadContext = threadContext;
Commands = new SendBindingUICommands(bridge);
// TODO expiry events
@@ -97,6 +91,8 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
_store.DocumentChanged += (_, _) => topLevelExceptionHandler.FireAndForget(async () => await OnDocumentChanged());
}
private async Task OnDocumentStoreChangedEvent(object _) => await Commands.NotifyDocumentChanged();
public List<ISendFilter> GetSendFilters() =>
[
new RevitSelectionFilter() { IsDefault = true },
@@ -108,8 +104,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
[
new DetailLevelSetting(DetailLevelType.Medium),
new ReferencePointSetting(ReferencePointType.InternalOrigin),
new SendParameterNullOrEmptyStringsSetting(false),
new LinkedModelsSetting(true)
new SendParameterNullOrEmptyStringsSetting(false)
];
public void CancelSend(string modelCardId) => _cancellationManager.CancelOperation(modelCardId);
@@ -136,23 +131,23 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
_revitConversionSettingsFactory.Create(
_toSpeckleSettingsManager.GetDetailLevelSetting(modelCard),
_toSpeckleSettingsManager.GetReferencePointSetting(modelCard),
_toSpeckleSettingsManager.GetSendParameterNullOrEmptyStringsSetting(modelCard),
_toSpeckleSettingsManager.GetLinkedModelsSetting(modelCard)
_toSpeckleSettingsManager.GetSendParameterNullOrEmptyStringsSetting(modelCard)
)
);
var elementsByTransform = await RefreshElementsIdsOnSender(modelCard.NotNull());
List<Element> elements = await RefreshElementsOnSender(modelCard.NotNull());
List<ElementId> elementIds = elements.Select(el => el.Id).ToList();
if (elementsByTransform.Count == 0)
if (elementIds.Count == 0)
{
// Handle as CARD ERROR in this function
throw new SpeckleSendFilterException("No objects were found to convert. Please update your publish filter!");
}
var sendResult = await scope
.ServiceProvider.GetRequiredService<SendOperation<DocumentToConvert>>()
.ServiceProvider.GetRequiredService<SendOperation<ElementId>>()
.Execute(
elementsByTransform,
elementIds,
modelCard.GetSendInfo(_speckleApplication.ApplicationAndVersion),
_operationProgressManager.CreateOperationProgressEventHandler(Parent, modelCardId, cancellationItem.Token),
cancellationItem.Token
@@ -182,76 +177,28 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
}
}
private async Task<List<DocumentToConvert>> RefreshElementsIdsOnSender(SenderModelCard modelCard)
private async Task<List<Element>> RefreshElementsOnSender(SenderModelCard modelCard)
{
var activeUIDoc =
_revitContext.UIApplication.NotNull().ActiveUIDocument
?? throw new SpeckleException("Unable to retrieve active UI document");
if (modelCard.SendFilter.NotNull() is IRevitSendFilter viewFilter)
if (modelCard.SendFilter is IRevitSendFilter viewFilter)
{
viewFilter.SetContext(_revitContext);
}
var selectedObjects = await _threadContext.RunOnMainAsync(
() => Task.FromResult(modelCard.SendFilter.NotNull().RefreshObjectIds())
);
var selectedObjects = modelCard.SendFilter.NotNull().RefreshObjectIds();
var allElements = selectedObjects
List<Element> elements = selectedObjects
.Select(uid => activeUIDoc.Document.GetElement(uid))
.Where(el => el is not null)
.ToList();
// split elements between main model and linked models
var elementsOnMainModel = allElements.Where(el => el is not RevitLinkInstance).ToList();
var linkedModels = allElements.OfType<RevitLinkInstance>().ToList();
// create context for main document elements
List<DocumentToConvert> documentElementContexts = [new(null, activeUIDoc.Document, elementsOnMainModel)];
// get the linked models setting - this decision belongs at this level
bool includeLinkedModels = _toSpeckleSettingsManager.GetLinkedModelsSetting(modelCard);
// ⚠️ process linked models - RevitSendBinding controls the flow based on settings!
// If setting not enabled, we won't unpack (see if-else block)
if (linkedModels.Count > 0)
{
var linkedDocumentContexts = new List<DocumentToConvert>();
foreach (var linkedModel in linkedModels)
{
var linkedDoc = linkedModel.GetLinkDocument();
if (linkedDoc == null)
{
continue;
}
var transform = linkedModel.GetTotalTransform().Inverse;
// decision about whether to process elements is made here, not in the handler
// only collects elements from linked models when the setting is enabled
if (includeLinkedModels)
{
// handler is only responsible for element collection mechanics
var linkedElements = _linkedModelHandler.GetLinkedModelElements(modelCard.SendFilter, linkedDoc);
linkedDocumentContexts.Add(new(transform, linkedDoc, linkedElements));
}
// ⚠️ when disabled, still adds empty contexts to maintain warning generation in RevitRootObjectBuilder
// this approach (to signal that warnings are needed) relies on empty element lists which smells and is a bit of an implicit mechanism
// buuuuut, it works (for now 👀).
else
{
linkedDocumentContexts.Add(new(transform, linkedDoc, new List<Element>()));
}
}
documentElementContexts.AddRange(linkedDocumentContexts);
}
// update ID map
if (modelCard.SendFilter is not null && modelCard.SendFilter.IdMap is not null)
{
var newSelectedObjectIds = new List<string>();
foreach (Element element in allElements)
foreach (Element element in elements)
{
modelCard.SendFilter.IdMap[element.Id.ToString()] = element.UniqueId;
newSelectedObjectIds.Add(element.UniqueId);
@@ -265,7 +212,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
);
}
return documentElementContexts;
return elements;
}
/// <summary>
@@ -294,17 +241,17 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
foreach (ElementId elementId in addedElementIds)
{
ChangedObjectIds.Add(elementId);
ChangedObjectIds[elementId] = 1;
}
foreach (ElementId elementId in deletedElementIds)
{
ChangedObjectIds.Add(elementId);
ChangedObjectIds[elementId] = 1;
}
foreach (ElementId elementId in modifiedElementIds)
{
ChangedObjectIds.Add(elementId);
ChangedObjectIds[elementId] = 1;
}
if (addedElementIds.Count > 0)
@@ -325,7 +272,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
var selectedObjects = sender.SendFilter.NotNull().SelectedObjectIds;
objectIds.AddRange(selectedObjects);
}
var unpackedObjectIds = _elementUnpacker.GetUnpackedElementIds(objectIds);
var unpackedObjectIds = _elementUnpacker.GetUnpackedElementIds(objectIds.ToList());
_sendConversionCache.EvictObjects(unpackedObjectIds);
}
@@ -371,7 +318,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
{
foreach (var sender in _store.GetSenders().ToList())
{
await RefreshElementsIdsOnSender(sender);
await RefreshElementsOnSender(sender);
}
}
@@ -390,7 +337,9 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
// }
if (
ChangedObjectIds.Any(e => _revitContext.UIApplication.NotNull().ActiveUIDocument.Document.GetElement(e) is View)
ChangedObjectIds.Keys.Any(e =>
_revitContext.UIApplication.NotNull().ActiveUIDocument.Document.GetElement(e) is View
)
)
{
await Commands.RefreshSendFilters();
@@ -409,7 +358,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
}
var objUniqueIds = new List<string>();
var changedIds = ChangedObjectIds.ToList();
var changedIds = ChangedObjectIds.Keys.ToList();
// Handling type changes: if an element's type is changed, we need to mark as changed all objects that have that type.
// Step 1: get any changed types
@@ -417,10 +366,10 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
.Select(e => doc.GetElement(e))
.OfType<ElementType>()
.Select(el => el.Id)
.ToHashSet(); // ToHashSet() for faster Contains
.ToArray();
// Step 2: Find all elements of the changed types, and add them to the changed ids list.
if (elementTypeIdsList.Count != 0)
if (elementTypeIdsList.Length != 0)
{
using var collector = new FilteredElementCollector(doc);
var collectorElements = collector
@@ -35,7 +35,7 @@ internal sealed class SelectionBinding : RevitBaseBinding, ISelectionBinding, ID
#else
_revitContext.UIApplication.NotNull().SelectionChanged += (_, _) =>
_idleManager.SubscribeToIdle(nameof(OnSelectionChanged), OnSelectionChanged);
_idleManager.SubscribeToIdle(nameof(SelectionBinding), OnSelectionChanged);
#endif
}
@@ -56,16 +56,15 @@ internal sealed class SelectionBinding : RevitBaseBinding, ISelectionBinding, ID
}
var activeUIDoc = _revitContext.UIApplication.ActiveUIDocument.NotNull();
var doc = activeUIDoc.Document;
// POC: this was also being called on shutdown
// probably the bridge needs to be able to know if the plugin has been terminated
// also on termination the OnSelectionChanged event needs unwinding
var selectionIds = activeUIDoc.Selection.GetElementIds();
//reduce allocates by allocating what we need.
var selectionUniqueIds = new List<string>(selectionIds.Count);
selectionUniqueIds.AddRange(selectionIds.Select(eid => doc.GetElement(eid).UniqueId));
return new SelectionInfo(selectionUniqueIds, $"{selectionIds.Count} objects selected.");
var selectionIds = activeUIDoc
.Selection.GetElementIds()
.Select(eid => activeUIDoc.Document.GetElement(eid).UniqueId.ToString())
.ToList();
return new SelectionInfo(selectionIds, $"{selectionIds.Count} objects selected.");
}
public void Dispose()
@@ -48,13 +48,12 @@ public static class ServiceRegistration
serviceCollection.AddSingleton<IAppIdleManager, RevitIdleManager>();
// send operation and dependencies
serviceCollection.AddScoped<SendOperation<DocumentToConvert>>();
serviceCollection.AddScoped<SendOperation<ElementId>>();
serviceCollection.AddScoped<ElementUnpacker>();
serviceCollection.AddScoped<SendCollectionManager>();
serviceCollection.AddScoped<IRootObjectBuilder<DocumentToConvert>, RevitRootObjectBuilder>();
serviceCollection.AddScoped<IRootObjectBuilder<ElementId>, RevitRootObjectBuilder>();
serviceCollection.AddSingleton<ISendConversionCache, SendConversionCache>();
serviceCollection.AddSingleton<ToSpeckleSettingsManager>();
serviceCollection.AddSingleton<LinkedModelHandler>();
// receive operation and dependencies
serviceCollection.AddScoped<IHostObjectBuilder, RevitHostObjectBuilder>();
@@ -1,5 +0,0 @@
using Autodesk.Revit.DB;
namespace Speckle.Connectors.Revit.HostApp;
public record DocumentToConvert(Transform? Transform, Document Doc, List<Element> Elements);
@@ -1,8 +1,6 @@
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Architecture;
using Speckle.Converters.Common;
using Speckle.Converters.RevitShared.Helpers;
using Speckle.Converters.RevitShared.Settings;
namespace Speckle.Connectors.Revit.HostApp;
@@ -12,12 +10,10 @@ namespace Speckle.Connectors.Revit.HostApp;
public class ElementUnpacker
{
private readonly RevitContext _revitContext;
private readonly IConverterSettingsStore<RevitConversionSettings> _converterSettings;
public ElementUnpacker(RevitContext revitContext, IConverterSettingsStore<RevitConversionSettings> converterSettings)
public ElementUnpacker(RevitContext revitContext)
{
_revitContext = revitContext;
_converterSettings = converterSettings;
}
/// <summary>
@@ -25,21 +21,18 @@ public class ElementUnpacker
/// This method will also "pack" curtain walls if necessary (ie, if mullions or panels are selected without their parent curtain wall, they are sent independently; if the parent curtain wall is selected, they will be removed out as the curtain wall will include all its children).
/// </summary>
/// <param name="selectionElements"></param>
/// <param name="doc"> We use the nullable document (happiness level 5/10) for the sake of linked models - bc we use this function in 2 different places <br/>
/// 1- RootObjectBuilder with linked model document - otherwise we cannot unpack elements from correct document.<br/>
/// 2- Evicting the cache while introducing the settings</param>
/// <returns></returns>
public IEnumerable<Element> UnpackSelectionForConversion(IEnumerable<Element> selectionElements, Document? doc = null)
public IEnumerable<Element> UnpackSelectionForConversion(IEnumerable<Element> selectionElements)
{
// Note: steps kept separate on purpose.
// Step 1: unpack groups
var atomicObjects = UnpackElements(selectionElements, doc);
var atomicObjects = UnpackElements(selectionElements);
// Step 2: pack curtain wall elements, once we know the full extent of our flattened item list.
// The behaviour we're looking for:
// If parent wall is part of selection, does not select individual elements out. Otherwise, selects individual elements (Panels, Mullions) as atomic objects.
// NOTE: this also conditionally "packs" stacked wall elements if their parent is present. See detailed note inside the function.
return PackCurtainWallElementsAndStackedWalls(atomicObjects, doc);
return PackCurtainWallElementsAndStackedWalls(atomicObjects);
}
/// <summary>
@@ -50,52 +43,38 @@ public class ElementUnpacker
/// <remarks>
/// This is used to invalidate object ids in the send conversion cache when the selected object id is only the parent element id
/// </remarks>
public IEnumerable<string> GetUnpackedElementIds(IEnumerable<string> objectIds)
public IEnumerable<string> GetUnpackedElementIds(List<string> objectIds)
{
var doc = _revitContext.UIApplication?.ActiveUIDocument.Document!;
var docElements = doc.GetElements(objectIds);
return UnpackSelectionForConversion(docElements).Select(o => o.UniqueId).ToList();
}
// We use the nullable document (happiness level 5/10) for the sake of linked models - bc we use this function in 2 different places
// 1- RootObjectBuilder with linked model document - otherwise we cannot unpack elements from correct document.
// 2- Evicting the cache while introducing the settings
private List<Element> UnpackElements(IEnumerable<Element> elements, Document? doc = null)
private List<Element> UnpackElements(IEnumerable<Element> elements)
{
var unpackedElements = new List<Element>(); // note: could be a hashset/map so we prevent duplicates (?)
if (doc == null)
{
doc = _revitContext.UIApplication?.ActiveUIDocument.Document!;
}
var doc = _revitContext.UIApplication?.ActiveUIDocument.Document!;
foreach (var element in elements)
{
// UNPACK: Groups
if (element is Group g)
{
// When a group is from a linked model, GetMemberIds may behave differently
// We add null checks to handle cases where elements can't be properly resolved
// POC: this might screw up generating hosting rel generation here, because nested families in groups get flattened out by GetMemberIds().
var groupElements = g.GetMemberIds().Select(doc.GetElement).Where(el => el != null);
var groupElements = g.GetMemberIds().Select(doc.GetElement);
unpackedElements.AddRange(UnpackElements(groupElements));
}
else if (element is BaseArray baseArray)
{
// For arrays, collect both copied and original members with null checks
// This handles cases where some elements might not resolve in linked contexts
var arrayElements = baseArray.GetCopiedMemberIds().Select(doc.GetElement).Where(el => el != null);
var originalElements = baseArray.GetOriginalMemberIds().Select(doc.GetElement).Where(el => el != null);
var arrayElements = baseArray.GetCopiedMemberIds().Select(doc.GetElement);
var originalElements = baseArray.GetOriginalMemberIds().Select(doc.GetElement);
unpackedElements.AddRange(UnpackElements(arrayElements));
unpackedElements.AddRange(UnpackElements(originalElements));
}
// UNPACK: Family instances (as they potentially have nested families inside)
else if (element is FamilyInstance familyInstance)
{
var familyElements = familyInstance
.GetSubComponentIds()
.Select(doc.GetElement)
.Where(el => el != null)
.ToArray();
var familyElements = familyInstance.GetSubComponentIds().Select(doc.GetElement).ToArray();
if (familyElements.Length != 0)
{
@@ -106,7 +85,7 @@ public class ElementUnpacker
}
else if (element is MultistoryStairs multistoryStairs)
{
var stairs = multistoryStairs.GetAllStairsIds().Select(doc.GetElement).Where(el => el != null);
var stairs = multistoryStairs.GetAllStairsIds().Select(doc.GetElement);
unpackedElements.AddRange(UnpackElements(stairs));
}
else
@@ -116,22 +95,13 @@ public class ElementUnpacker
}
// Why filtering for duplicates? Well, well, well... it's related to the comment above on groups: if a group
// contains a nested family, GetMemberIds() will return... duplicates of the exploded family components.
// Add null check before GroupBy to prevent NullReferenceException when processing linked models with groups
// This ensures we don't try to access .Id on any null elements that might have been added during the unpacking process
return unpackedElements.Where(el => el != null).GroupBy(el => el.Id).Select(g => g.First()).ToList(); // no disinctBy in here sadly.
return unpackedElements.GroupBy(el => el.Id).Select(g => g.First()).ToList(); // no disinctBy in here sadly.
}
// We use the nullable document (happiness level 5/10) for the sake of linked models - bc we use this function in 2 different places
// 1- RootObjectBuilder with linked model document - otherwise we cannot unpack elements from correct document.
// 2- Evicting the cache while introducing the settings
private List<Element> PackCurtainWallElementsAndStackedWalls(List<Element> elements, Document? doc = null)
private List<Element> PackCurtainWallElementsAndStackedWalls(List<Element> elements)
{
var ids = elements.Select(el => el.Id).ToArray();
if (doc == null)
{
doc = _revitContext.UIApplication?.ActiveUIDocument.Document!;
}
var doc = _revitContext.UIApplication?.ActiveUIDocument.Document!;
elements.RemoveAll(element =>
(element is Mullion { Host: not null } m && ids.Contains(m.Host.Id))
|| (element is Panel { Host: not null } p && ids.Contains(p.Host.Id))
@@ -1,178 +0,0 @@
using System.IO;
using Autodesk.Revit.DB;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.RevitShared;
using Speckle.Connectors.RevitShared.Operations.Send.Filters;
using Speckle.Converters.RevitShared.Helpers;
using Speckle.Sdk.Common;
namespace Speckle.Connectors.Revit.HostApp;
/// <summary>
/// Handles unpacking elements inside linked models.
/// This class is responsible for the mechanics of retrieving elements from linked documents
/// based on different filter types, but not for making decisions about whether linked models
/// should be processed (which is the responsibility of the calling code)!
/// </summary>
public class LinkedModelHandler
{
private readonly RevitContext _revitContext;
public Dictionary<string, string> LinkedModelDisplayNames { get; } = new();
public LinkedModelHandler(RevitContext revitContext)
{
_revitContext = revitContext;
}
/// <summary>
/// Gets elements from a linked document based on the provided send filter.
/// This method handles the specifics of element collection but doesn't make decisions
/// about whether the linked model should be processed - that's the caller's responsibility.
/// </summary>
public List<Element> GetLinkedModelElements(ISendFilter sendFilter, Document linkedDocument)
{
// send mode → Categories
if (sendFilter is RevitCategoriesFilter categoryFilter && categoryFilter.SelectedCategories is not null)
{
var categoryIds = categoryFilter
.SelectedCategories.Select(c => ElementIdHelper.GetElementId(c))
.OfType<ElementId>()
.ToList();
if (categoryIds.Count > 0)
{
return GetElementsByCategory(linkedDocument, categoryIds);
}
return new List<Element>();
}
// send mode → Views (taken from the legacy code)
if (sendFilter is RevitViewsFilter viewFilter && viewFilter.GetView() != null)
{
RevitLinkInstance linkInstance = FindLinkInstanceForDocument(
linkedDocument.PathName,
_revitContext.UIApplication.NotNull().ActiveUIDocument.Document
);
#if REVIT2024_OR_GREATER
// revit 2024 and 2025 we can use the three-parameter constructor to get only visible elements
using var viewCollector = new FilteredElementCollector(
_revitContext.UIApplication.ActiveUIDocument.Document,
viewFilter.GetView().NotNull().Id,
linkInstance.Id
);
return viewCollector.WhereElementIsNotElementType().ToElements().ToList();
#else
// 🚨 LIMITATION: in Revit 2023 and below, we can only check if the entire linked model is visible,
// not individual elements within it. If the linked model is visible, all its elements will be included.
// constructor overload pertaining to searching and filtering visible elements from a revit link only added 2024.
if (linkInstance.IsHidden(viewFilter.GetView().NotNull()))
{
return new List<Element>(); // if the linked model is hidden, return no elements
}
// 💩 fallback to getting all elements if the linked model is visible
return GetAllElementsForLinkedModelSelection(linkedDocument);
#endif
}
// send mode → Selection
return GetAllElementsForLinkedModelSelection(linkedDocument);
}
/// <summary>
/// Prepares display names for linked model documents based on filename
/// </summary>
public void PrepareLinkedModelNames(IReadOnlyList<DocumentToConvert> documentElementContexts)
{
LinkedModelDisplayNames.Clear();
// Group linked models by filename
var linkedModels = documentElementContexts
.Where(ctx => ctx.Doc.IsLinked)
.GroupBy(ctx => Path.GetFileNameWithoutExtension(ctx.Doc.PathName))
.ToDictionary(g => g.Key, g => g.ToList());
// Create a unique key for each instance
foreach (var group in linkedModels)
{
string baseName = group.Key;
var instances = group.Value;
// Single instance - just use the base name
if (instances.Count == 1)
{
string id = GetIdFromDocumentToConvert(instances[0]);
LinkedModelDisplayNames[id] = baseName;
}
// Multiple instances - add numbering
else
{
for (int i = 0; i < instances.Count; i++)
{
string id = GetIdFromDocumentToConvert(instances[i]);
LinkedModelDisplayNames[id] = $"{baseName}_{i + 1}";
}
}
}
}
public string GetIdFromDocumentToConvert(DocumentToConvert documentToConvert) =>
documentToConvert.Doc.GetHashCode() + "-" + (documentToConvert.Transform?.GetHashCode() ?? 0);
/// <summary>
/// Gets elements from a document that belong to the specified categories.
/// </summary>
private List<Element> GetElementsByCategory(Document linkedDoc, List<ElementId> categoryIds)
{
using var multicategoryFilter = new ElementMulticategoryFilter(categoryIds);
using var collector = new FilteredElementCollector(linkedDoc);
return collector
.WhereElementIsNotElementType()
.WhereElementIsViewIndependent()
.WherePasses(multicategoryFilter)
.ToList();
}
// Helper method to generate a simple hash for a transform
// transformedElement.applicationId = ${applicationId}-t{transformHash}
public string GetTransformHash(Transform transform)
{
// create a simplified representation of the transform
string json =
$@"{{
""origin"": [{transform.Origin.X:F2}, {transform.Origin.Y:F2}, {transform.Origin.Z:F2}],
""basis"": [{transform.BasisX.X:F1}, {transform.BasisY.Y:F1}, {transform.BasisZ.Z:F1}]
}}";
byte[] jsonBytes = System.Text.Encoding.UTF8.GetBytes(json);
#pragma warning disable CA1850
using (var sha256 = System.Security.Cryptography.SHA256.Create())
{
byte[] hashBytes = sha256.ComputeHash(jsonBytes);
// keep only the first 8 characters for a short but unique hash
return BitConverter.ToString(hashBytes).Replace("-", "").ToLowerInvariant()[..8];
}
#pragma warning restore CA1850
}
/// <summary>
/// Retrieves all elements from the linked document when using selection filters.
/// When a linked model is selected in the main document, we include all elements
/// from that linked model since the selection is of the entire linked instance.
/// </summary>
private List<Element> GetAllElementsForLinkedModelSelection(Document linkedDoc)
{
using var collector = new FilteredElementCollector(linkedDoc);
return collector.WhereElementIsNotElementType().WhereElementIsViewIndependent().ToList();
}
private RevitLinkInstance FindLinkInstanceForDocument(string linkedDocumentPath, Document mainDocument)
{
using var collector = new FilteredElementCollector(mainDocument);
return collector
.OfClass(typeof(RevitLinkInstance))
.Cast<RevitLinkInstance>()
.FirstOrDefault(link => link.GetLinkDocument()?.PathName == linkedDocumentPath)
.NotNull();
}
}
@@ -76,7 +76,7 @@ internal sealed class RevitDocumentStore : DocumentModelStore
IsDocumentInit = true;
_idleManager.SubscribeToIdle(
nameof(LoadState) + nameof(OnDocumentChanged),
nameof(RevitDocumentStore),
() =>
{
LoadState();
@@ -1,8 +1,6 @@
using System.IO;
using Autodesk.Revit.DB;
using Speckle.Converters.Common;
using Speckle.Converters.RevitShared.Settings;
using Speckle.Sdk;
using Speckle.Sdk.Models.Collections;
namespace Speckle.Connectors.Revit.HostApp;
@@ -15,8 +13,6 @@ public class SendCollectionManager
private readonly IConverterSettingsStore<RevitConversionSettings> _converterSettings;
private readonly Dictionary<string, Collection> _collectionCache = new();
private readonly Dictionary<ElementId, (string name, Dictionary<string, object?> props)> _levelCache = new(); // stores level id and its properties
private readonly Dictionary<string, Collection> _linkedModelCollections = new(); // cache for linked model collections
private Collection? _mainModelCollection; // collection for main model elements
public SendCollectionManager(IConverterSettingsStore<RevitConversionSettings> converterSettings)
{
@@ -24,72 +20,18 @@ public class SendCollectionManager
}
/// <summary>
/// Returns the element's host collection based on level, category and optional type if the main model only is sent.
/// The host collection is placed on the provided root object.
/// If linked models are being sent, nested collections are sent under the provided root object.
/// Returns the element's host collection based on level, category and optional type. Additionally, places the host collection on the provided root object.
/// Note, it's not nice we're mutating the root object in this function.
/// </summary>
/// <param name="element"></param>
/// <param name="rootObject"></param>
/// <returns></returns>
public Collection GetAndCreateObjectHostCollection(
Element element,
Collection rootObject,
bool sendWithLinkedModels,
string? modelDisplayName = null
)
public Collection GetAndCreateObjectHostCollection(Element element, Collection rootObject)
{
var doc = _converterSettings.Current.Document;
var path = new List<string>();
// Get model path and name
string modelPath = doc.PathName;
string modelName = Path.GetFileNameWithoutExtension(modelPath);
bool isLinkedModel = doc.IsLinked;
// Set up the correct hierarchy based on whether we have linked models or not
Collection startingCollection;
if (sendWithLinkedModels) // this arg comes from RevitRootObjectBuilder and check is setting enabled and linked models present
{
// if we're sending linked models, create a nested structure
// for the main model
if (!isLinkedModel)
{
// create main model collection if it doesn't exist yet
if (_mainModelCollection == null)
{
_mainModelCollection = new Collection(rootObject.name);
rootObject.elements.Add(_mainModelCollection);
}
startingCollection = _mainModelCollection;
}
// for linked models
else
{
// Use display name from settings if available, otherwise use original name
string displayName = modelDisplayName ?? modelName;
// Check if we already have a collection for this model display name
if (!_linkedModelCollections.TryGetValue(displayName, out Collection? linkedModelCollection))
{
// First time seeing this model with this display name
linkedModelCollection = new Collection(displayName);
rootObject.elements.Add(linkedModelCollection);
_linkedModelCollections[displayName] = linkedModelCollection;
}
startingCollection = linkedModelCollection;
}
}
else
{
// if we don't have linked models, use the root directly
startingCollection = rootObject;
}
// get the level and its properties
// Step 0: get the level and its properties
string levelName = "No Level";
Dictionary<string, object?> levelProperties = new();
if (element.LevelId != ElementId.InvalidElementId)
@@ -101,20 +43,15 @@ public class SendCollectionManager
}
else
{
try
{
var level = (Level)doc.GetElement(element.LevelId);
levelName = level.Name;
levelProperties.Add("elevation", level.Elevation);
levelProperties.Add("units", _converterSettings.Current.SpeckleUnits);
_levelCache.Add(element.LevelId, (levelName, levelProperties));
}
// the exception is swallowed since if an exception occurs, we fall back to "No Level" for the element
catch (Exception e) when (!e.IsFatal()) { }
var level = (Level)doc.GetElement(element.LevelId);
levelName = level.Name;
levelProperties.Add("elevation", level.Elevation);
levelProperties.Add("units", _converterSettings.Current.SpeckleUnits);
_levelCache.Add(element.LevelId, (levelName, levelProperties));
}
}
// create path components. Currently, this is
// Step 1: create path components. Currently, this is
// level > category > type
path.Add(levelName);
path.Add(element.Category?.Name ?? "No category");
@@ -132,23 +69,19 @@ public class SendCollectionManager
path.Add("No type");
}
// Use the collection's name for cache keys to ensure proper separation
string modelIdentifier = startingCollection.name;
// create a model-specific key for the collection cache
string fullPathName = $"{modelIdentifier}:{string.Join(":", path)}";
string fullPathName = string.Concat(path);
if (_collectionCache.TryGetValue(fullPathName, out Collection? value))
{
return value;
}
string flatPathName = modelIdentifier;
Collection previousCollection = startingCollection;
string flatPathName = "";
Collection previousCollection = rootObject;
for (int i = 0; i < path.Count; i++)
{
var pathItem = path[i];
flatPathName += ":" + pathItem;
flatPathName += pathItem;
Collection childCollection;
if (_collectionCache.TryGetValue(flatPathName, out Collection? collection))
{
@@ -157,7 +90,8 @@ public class SendCollectionManager
else
{
childCollection = new Collection(pathItem);
// add properties to level collection
// add props if it's the 1st path item, representing level
// if the structure ever changes from level > category > type, this needs to be changed
if (i == 0 && levelProperties.Count > 0)
{
childCollection["properties"] = levelProperties;
@@ -40,17 +40,12 @@ public class RevitCategoriesFilter : DiscriminatedObject, ISendFilter, IRevitSen
/// <exception cref="SpeckleSendFilterException">Whenever no view is found.</exception>
public List<string> RefreshObjectIds()
{
var objectIds = new List<string>();
if (SelectedCategories is null)
{
return [];
return objectIds;
}
// ⚠️ this is ugly, BUT we need to preserve RevitLinkInstances regardless of category.
// these get unpacked later in the RefreshElementsIdsOnSender, so if we don't do this, they'll get filtered out here
using var linkCollector = new FilteredElementCollector(_doc);
var linkInstanceIds = linkCollector.OfClass(typeof(RevitLinkInstance)).Select(link => link.UniqueId).ToList();
// get elements that match the selected categories (excluding RevitLinkInstance objects)
var elementIds = SelectedCategories.Select(c => ElementIdHelper.GetElementId(c)).Where(e => e is not null).ToList();
using var categoryFilter = new ElementMulticategoryFilter(elementIds);
@@ -60,11 +55,7 @@ public class RevitCategoriesFilter : DiscriminatedObject, ISendFilter, IRevitSen
.WhereElementIsViewIndependent()
.WherePasses(categoryFilter)
.ToList();
// combine both sets
var objectIds = elements.Select(e => e.UniqueId).ToList();
objectIds.AddRange(linkInstanceIds);
objectIds = elements.Select(e => e.UniqueId).ToList();
SelectedObjectIds = objectIds;
return objectIds;
}
@@ -53,9 +53,10 @@ public class RevitViewsFilter : DiscriminatedObject, ISendFilter, IRevitSendFilt
/// <exception cref="SpeckleSendFilterException">Whenever no view is found.</exception>
public List<string> RefreshObjectIds()
{
var objectIds = new List<string>();
if (SelectedView is null)
{
return [];
return objectIds;
}
// Paşa Bilal wants it like this... (three dots = important meaning for ogu)
@@ -74,8 +75,8 @@ public class RevitViewsFilter : DiscriminatedObject, ISendFilter, IRevitSendFilt
throw new SpeckleSendFilterException("View not found, please update your model send filter.");
}
using var viewCollector = new FilteredElementCollector(_doc, view.Id);
var elementsInView = viewCollector.ToElements();
var objectIds = elementsInView.Select(e => e.UniqueId).ToList();
List<Element> elementsInView = viewCollector.ToElements().ToList();
objectIds = elementsInView.Select(e => e.UniqueId).ToList();
SelectedObjectIds = objectIds;
return objectIds;
}
@@ -5,13 +5,13 @@ using Speckle.Connectors.Common.Caching;
using Speckle.Connectors.Common.Conversion;
using Speckle.Connectors.Common.Extensions;
using Speckle.Connectors.Common.Operations;
using Speckle.Connectors.Common.Threading;
using Speckle.Connectors.DUI.Exceptions;
using Speckle.Connectors.Revit.HostApp;
using Speckle.Converters.Common;
using Speckle.Converters.RevitShared.Helpers;
using Speckle.Converters.RevitShared.Settings;
using Speckle.Sdk;
using Speckle.Sdk.Common;
using Speckle.Sdk.Models;
using Speckle.Sdk.Models.Collections;
@@ -22,17 +22,26 @@ public class RevitRootObjectBuilder(
IConverterSettingsStore<RevitConversionSettings> converterSettings,
ISendConversionCache sendConversionCache,
ElementUnpacker elementUnpacker,
IThreadContext threadContext,
SendCollectionManager sendCollectionManager,
ILogger<RevitRootObjectBuilder> logger,
RevitToSpeckleCacheSingleton revitToSpeckleCacheSingleton,
LinkedModelHandler linkedModelHandler
) : IRootObjectBuilder<DocumentToConvert>
RevitToSpeckleCacheSingleton revitToSpeckleCacheSingleton
) : IRootObjectBuilder<ElementId>
{
// POC: SendSelection and RevitConversionContextStack should be interfaces, former needs interfaces
public Task<RootObjectBuilderResult> Build(
IReadOnlyList<DocumentToConvert> documentElementContexts,
IReadOnlyList<ElementId> objects,
SendInfo sendInfo,
IProgress<CardProgress> onOperationProgressed,
CancellationToken ct = default
) => threadContext.RunOnMainAsync(() => Task.FromResult(BuildSync(objects, sendInfo, onOperationProgressed, ct)));
private RootObjectBuilderResult BuildSync(
IReadOnlyList<ElementId> objects,
SendInfo sendInfo,
IProgress<CardProgress> onOperationProgressed,
CancellationToken cancellationToken
)
{
var doc = converterSettings.Current.Document;
@@ -42,193 +51,102 @@ public class RevitRootObjectBuilder(
throw new SpeckleException("Family Environment documents are not supported.");
}
// init the root
// 0 - Init the root
Collection rootObject =
new() { name = converterSettings.Current.Document.PathName.Split('\\').Last().Split('.').First() };
rootObject["units"] = converterSettings.Current.SpeckleUnits;
var filteredDocumentsToConvert = new List<DocumentToConvert>();
bool sendWithLinkedModels = converterSettings.Current.SendLinkedModels;
List<SendConversionResult> results = new();
// Prepare linked model display names if needed
if (sendWithLinkedModels)
var revitElements = new List<Element>();
List<SendConversionResult> results = new(revitElements.Count);
// Convert ids to actual revit elements
foreach (var id in objects)
{
linkedModelHandler.PrepareLinkedModelNames(documentElementContexts);
}
foreach (var documentElementContext in documentElementContexts)
{
// add appropriate warnings for linked documents
if (documentElementContext.Doc.IsLinked && !sendWithLinkedModels)
var el = converterSettings.Current.Document.GetElement(id);
if (el == null)
{
results.Add(
new(
Status.WARNING,
documentElementContext.Doc.PathName,
typeof(RevitLinkInstance).ToString(),
null,
new SpeckleException("Enable linked model support from the settings to send this object")
)
);
continue;
}
// filter for valid elements
// if send linked models setting is disabled List<Elements> will be empty, and we won't enter foreach loop
var elementsInTransform = new List<Element>();
foreach (var el in documentElementContext.Elements)
if (el.Category == null)
{
if (el == null || el.Category == null)
{
continue;
}
elementsInTransform.Add(el);
continue;
}
// only add contexts with elements
if (elementsInTransform.Count > 0)
{
filteredDocumentsToConvert.Add(documentElementContext with { Elements = elementsInTransform });
}
revitElements.Add(el);
}
// TODO: check the exception!!!!
if (filteredDocumentsToConvert.Count == 0)
if (revitElements.Count == 0)
{
throw new SpeckleSendFilterException("No objects were found. Please update your publish filter!");
}
// Unpack groups (& other complex data structures)
var atomicObjectsByDocumentAndTransform = new List<DocumentToConvert>();
var atomicObjectCount = 0;
foreach (var filteredDocumentToConvert in filteredDocumentsToConvert)
{
using (
converterSettings.Push(currentSettings => currentSettings with { Document = filteredDocumentToConvert.Doc })
)
{
var atomicObjects = elementUnpacker
.UnpackSelectionForConversion(filteredDocumentToConvert.Elements, filteredDocumentToConvert.Doc)
.ToList();
atomicObjectsByDocumentAndTransform.Add(filteredDocumentToConvert with { Elements = atomicObjects });
atomicObjectCount += atomicObjects.Count;
}
}
var atomicObjects = elementUnpacker.UnpackSelectionForConversion(revitElements).ToList();
var countProgress = 0;
var cacheHitCount = 0;
var skippedObjectCount = 0;
foreach (var atomicObjectByDocumentAndTransform in atomicObjectsByDocumentAndTransform)
foreach (Element revitElement in atomicObjects)
{
string? modelDisplayName = null;
if (atomicObjectByDocumentAndTransform.Doc.IsLinked)
cancellationToken.ThrowIfCancellationRequested();
string applicationId = revitElement.UniqueId;
string sourceType = revitElement.GetType().Name;
try
{
string id = linkedModelHandler.GetIdFromDocumentToConvert(atomicObjectByDocumentAndTransform);
linkedModelHandler.LinkedModelDisplayNames.TryGetValue(id, out modelDisplayName);
}
// here we do magic for changing the transform and the related document according to model. first one is always the main model.
using (
converterSettings.Push(currentSettings =>
currentSettings with
{
ReferencePointTransform = atomicObjectByDocumentAndTransform.Transform,
Document = atomicObjectByDocumentAndTransform.Doc,
}
)
)
{
var atomicObjects = atomicObjectByDocumentAndTransform.Elements;
foreach (Element revitElement in atomicObjects)
if (!SupportedCategoriesUtils.IsSupportedCategory(revitElement.Category))
{
ct.ThrowIfCancellationRequested();
string applicationId = revitElement.UniqueId;
string sourceType = revitElement.GetType().Name;
try
{
if (!SupportedCategoriesUtils.IsSupportedCategory(revitElement.Category))
{
var cat = revitElement.Category != null ? revitElement.Category.Name : "No category";
results.Add(
new(
Status.WARNING,
revitElement.UniqueId,
cat,
null,
new SpeckleException($"Category {cat} is not supported.")
)
);
skippedObjectCount++;
continue;
}
Base converted;
bool hasTransform = atomicObjectByDocumentAndTransform.Transform != null;
// non-transformed elements can safely rely on cache
// TODO: Potential here to transform cached objects and NOT reconvert,
// TODO: we wont do !hasTransform here, and re-set application id before this
if (
!hasTransform
&& sendConversionCache.TryGetValue(sendInfo.ProjectId, applicationId, out ObjectReference? value)
var cat = revitElement.Category != null ? revitElement.Category.Name : "No category";
results.Add(
new(
Status.WARNING,
revitElement.UniqueId,
cat,
null,
new SpeckleException($"Category {cat} is not supported.")
)
{
converted = value;
cacheHitCount++;
}
// not in cache means we convert
else
{
// if it has a transform we append transform hash to the applicationId to distinguish the elements from other instances
if (hasTransform)
{
string transformHash = linkedModelHandler.GetTransformHash(
atomicObjectByDocumentAndTransform.Transform.NotNull()
);
applicationId = $"{applicationId}_t{transformHash}";
}
// normal conversions
converted = converter.Convert(revitElement);
converted.applicationId = applicationId;
}
var collection = sendCollectionManager.GetAndCreateObjectHostCollection(
revitElement,
rootObject,
sendWithLinkedModels,
modelDisplayName
);
collection.elements.Add(converted);
results.Add(new(Status.SUCCESS, applicationId, sourceType, converted));
}
catch (Exception ex) when (!ex.IsFatal())
{
logger.LogSendConversionError(ex, sourceType);
results.Add(new(Status.ERROR, applicationId, sourceType, null, ex));
}
onOperationProgressed.Report(new("Converting", (double)++countProgress / atomicObjectCount));
);
skippedObjectCount++;
continue;
}
Base converted;
if (sendConversionCache.TryGetValue(sendInfo.ProjectId, applicationId, out ObjectReference? value))
{
converted = value;
cacheHitCount++;
}
else
{
converted = converter.Convert(revitElement);
converted.applicationId = applicationId;
}
var collection = sendCollectionManager.GetAndCreateObjectHostCollection(revitElement, rootObject);
collection.elements.Add(converted);
results.Add(new(Status.SUCCESS, applicationId, sourceType, converted));
}
catch (Exception ex) when (!ex.IsFatal())
{
logger.LogSendConversionError(ex, sourceType);
results.Add(new(Status.ERROR, applicationId, sourceType, null, ex));
}
onOperationProgressed.Report(new("Converting", (double)++countProgress / atomicObjects.Count));
}
if (results.All(x => x.Status == Status.ERROR) || skippedObjectCount == atomicObjectCount)
if (results.All(x => x.Status == Status.ERROR) || skippedObjectCount == atomicObjects.Count)
{
throw new SpeckleException("Failed to convert all objects.");
}
var idsAndSubElementIds = elementUnpacker.GetElementsAndSubelementIdsFromAtomicObjects(
atomicObjectsByDocumentAndTransform.SelectMany(t => t.Elements).ToList()
);
var idsAndSubElementIds = elementUnpacker.GetElementsAndSubelementIdsFromAtomicObjects(atomicObjects);
var renderMaterialProxies = revitToSpeckleCacheSingleton.GetRenderMaterialProxyListForObjects(idsAndSubElementIds);
rootObject[ProxyKeys.RENDER_MATERIAL] = renderMaterialProxies;
// NOTE: these are currently not used anywhere, we'll skip them until someone calls for it back
// rootObject[ProxyKeys.PARAMETER_DEFINITIONS] = _parameterDefinitionHandler.Definitions;
return Task.FromResult(new RootObjectBuilderResult(rootObject, results));
return new RootObjectBuilderResult(rootObject, results);
}
}
@@ -1,12 +0,0 @@
using Speckle.Connectors.DUI.Settings;
namespace Speckle.Connectors.Revit.Operations.Send.Settings;
public class LinkedModelsSetting(bool value) : ICardSetting
{
public string? Id { get; set; } = "includeLinkedModels";
public string? Title { get; set; } = "Include Linked Models";
public string? Type { get; set; } = "boolean";
public object? Value { get; set; } = value;
public List<string>? Enum { get; set; }
}
@@ -21,7 +21,6 @@ public class ToSpeckleSettingsManager : IToSpeckleSettingsManager
private readonly Dictionary<string, DetailLevelType> _detailLevelCache = new();
private readonly Dictionary<string, Transform?> _referencePointCache = new();
private readonly Dictionary<string, bool?> _sendNullParamsCache = new();
private readonly Dictionary<string, bool?> _sendLinkedModelsCache = new();
public ToSpeckleSettingsManager(
RevitContext revitContext,
@@ -103,24 +102,6 @@ public class ToSpeckleSettingsManager : IToSpeckleSettingsManager
return returnValue;
}
// NOTE: Cache invalidation currently a placeholder until we have more understanding on the sends
// TODO: Evaluate cache invalidation for GetLinkedModelsSetting
public bool GetLinkedModelsSetting(SenderModelCard modelCard)
{
var value = modelCard.Settings?.First(s => s.Id == "includeLinkedModels").Value as bool?;
var returnValue = value != null && value.NotNull();
if (_sendLinkedModelsCache.TryGetValue(modelCard.ModelCardId.NotNull(), out bool? previousValue))
{
if (previousValue != returnValue)
{
EvictCacheForModelCard(modelCard);
}
}
_sendLinkedModelsCache[modelCard.ModelCardId] = returnValue;
return returnValue;
}
private void EvictCacheForModelCard(SenderModelCard modelCard)
{
var objectIds = modelCard.SendFilter != null ? modelCard.SendFilter.NotNull().SelectedObjectIds : [];
@@ -20,9 +20,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Bindings\RevitSendBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ElementIdHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\DocumentModelStorageSchema.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\DocumentToConvert.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\Elements.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\LinkedModelHandler.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\RevitMaterialBaker.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\SupportedCategoriesUtils.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Receive\HideWarningsFailuresPreprocessor.cs" />
@@ -42,7 +40,6 @@
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Filters\RevitSelectionFilter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Filters\RevitViewsFilter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\RevitRootObjectBuilder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Settings\LinkedModelsSetting.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Settings\SendParameterNullOrEmptyStringsSetting.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Settings\ToSpeckleSettingsManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Settings\ReferencePointSetting.cs" />
@@ -268,9 +268,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -278,8 +278,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -296,7 +296,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"speckle.converters.rhino7": {
@@ -347,18 +347,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -368,14 +368,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -268,9 +268,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -278,8 +278,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -296,7 +296,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"speckle.converters.rhino8": {
@@ -347,18 +347,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -368,14 +368,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -72,8 +72,6 @@ public sealed class RhinoBasicConnectorBinding : IBasicConnectorBinding
public void RemoveModel(ModelCard model) => _store.RemoveModel(model);
public void RemoveModels(List<ModelCard> models) => _store.RemoveModels(models);
public Task HighlightObjects(IReadOnlyList<string> objectIds)
{
var objects = GetObjectsFromIds(objectIds);
@@ -24,7 +24,7 @@ public class RhinoSelectionBinding : ISelectionBinding
}
private void OnSelectionChange(object? o, EventArgs eventArgs) =>
_idleManager.SubscribeToIdle(nameof(UpdateSelection), UpdateSelection);
_idleManager.SubscribeToIdle(nameof(RhinoSelectionBinding), UpdateSelection);
private void UpdateSelection()
{
@@ -113,7 +113,8 @@ public sealed class RhinoSendBinding : ISendBinding
{
ChangedObjectIdsInGroupsOrLayers[selectedObject.Id.ToString()] = 1;
}
_idleManager.SubscribeToIdle(nameof(RunExpirationChecks), RunExpirationChecks);
_idleManager.SubscribeToIdle("a", RunExpirationChecks);
_idleManager.SubscribeToIdle(nameof(RhinoSendBinding), RunExpirationChecks);
}
};
@@ -143,7 +144,7 @@ public sealed class RhinoSendBinding : ISendBinding
}
ChangedObjectIds[e.ObjectId.ToString()] = 1;
_idleManager.SubscribeToIdle(nameof(RunExpirationChecks), RunExpirationChecks);
_idleManager.SubscribeToIdle(nameof(RhinoSendBinding), RunExpirationChecks);
});
RhinoDoc.DeleteRhinoObject += (_, e) =>
@@ -155,7 +156,7 @@ public sealed class RhinoSendBinding : ISendBinding
}
ChangedObjectIds[e.ObjectId.ToString()] = 1;
_idleManager.SubscribeToIdle(nameof(RunExpirationChecks), RunExpirationChecks);
_idleManager.SubscribeToIdle(nameof(RhinoSendBinding), RunExpirationChecks);
});
// NOTE: Catches an object's material change from one user defined doc material to another. Does not catch (as the top event is not triggered) swapping material sources for an object or moving to/from the default material (this is handled below)!
@@ -170,7 +171,7 @@ public sealed class RhinoSendBinding : ISendBinding
if (args is RhinoDoc.RenderMaterialAssignmentChangedEventArgs changedEventArgs)
{
ChangedObjectIds[changedEventArgs.ObjectId.ToString()] = 1;
_idleManager.SubscribeToIdle(nameof(RunExpirationChecks), RunExpirationChecks);
_idleManager.SubscribeToIdle(nameof(RhinoSendBinding), RunExpirationChecks);
}
});
@@ -186,7 +187,7 @@ public sealed class RhinoSendBinding : ISendBinding
{
ChangedObjectIdsInGroupsOrLayers[obj.Id.ToString()] = 1;
}
_idleManager.SubscribeToIdle(nameof(RunExpirationChecks), RunExpirationChecks);
_idleManager.SubscribeToIdle(nameof(RhinoSendBinding), RunExpirationChecks);
});
RhinoDoc.LayerTableEvent += (_, args) =>
@@ -219,7 +220,7 @@ public sealed class RhinoSendBinding : ISendBinding
ChangedObjectIdsInGroupsOrLayers[obj.Id.ToString()] = 1;
}
}
_idleManager.SubscribeToIdle(nameof(RunExpirationChecks), RunExpirationChecks);
_idleManager.SubscribeToIdle(nameof(RhinoSendBinding), RunExpirationChecks);
});
// Catches and stores changed material ids. These are then used in the expiry checks to invalidate all objects that have assigned any of those material ids.
@@ -234,7 +235,7 @@ public sealed class RhinoSendBinding : ISendBinding
if (args.EventType == MaterialTableEventType.Modified)
{
ChangedMaterialIndexes[args.Index] = 1;
_idleManager.SubscribeToIdle(nameof(RunExpirationChecks), RunExpirationChecks);
_idleManager.SubscribeToIdle(nameof(RhinoSendBinding), RunExpirationChecks);
}
});
@@ -259,7 +260,7 @@ public sealed class RhinoSendBinding : ISendBinding
)
{
ChangedObjectIds[e.RhinoObject.Id.ToString()] = 1;
_idleManager.SubscribeToIdle(nameof(RunExpirationChecks), RunExpirationChecks);
_idleManager.SubscribeToIdle(nameof(RhinoSendBinding), RunExpirationChecks);
}
});
@@ -273,7 +274,7 @@ public sealed class RhinoSendBinding : ISendBinding
ChangedObjectIds[e.NewRhinoObject.Id.ToString()] = 1;
ChangedObjectIds[e.OldRhinoObject.Id.ToString()] = 1;
_idleManager.SubscribeToIdle(nameof(RunExpirationChecks), RunExpirationChecks);
_idleManager.SubscribeToIdle(nameof(RhinoSendBinding), RunExpirationChecks);
});
}
@@ -325,9 +325,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -335,8 +335,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -362,7 +362,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"LibTessDotNet": {
@@ -412,18 +412,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -433,14 +433,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -406,9 +406,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -416,8 +416,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -443,7 +443,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"LibTessDotNet": {
@@ -493,18 +493,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -514,14 +514,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -60,8 +60,6 @@ public class TeklaBasicConnectorBinding : IBasicConnectorBinding
public void RemoveModel(ModelCard model) => _store.RemoveModel(model);
public void RemoveModels(List<ModelCard> models) => _store.RemoveModels(models);
public async Task HighlightModel(string modelCardId)
{
try
@@ -1,6 +1,5 @@
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Tekla.Structures;
using Tekla.Structures.Model;
namespace Speckle.Connectors.TeklaShared.Bindings;
@@ -11,7 +10,6 @@ public class TeklaSelectionBinding : ISelectionBinding
private readonly object _selectionEventHandlerLock = new object();
private readonly IAppIdleManager _idleManager;
private readonly Events _events;
private readonly Model _model;
private readonly Tekla.Structures.Model.UI.ModelObjectSelector _selector;
public string Name => "selectionBinding";
@@ -28,7 +26,6 @@ public class TeklaSelectionBinding : ISelectionBinding
Parent = parent;
_selector = selector;
_events = events;
_model = new Model();
_events.SelectionChange += OnSelectionChangeEvent;
_events.Register();
@@ -38,7 +35,7 @@ public class TeklaSelectionBinding : ISelectionBinding
{
lock (_selectionEventHandlerLock)
{
_idleManager.SubscribeToIdle(nameof(UpdateSelection), UpdateSelection);
_idleManager.SubscribeToIdle(nameof(TeklaSelectionBinding), UpdateSelection);
UpdateSelection();
}
}
@@ -73,15 +70,10 @@ public class TeklaSelectionBinding : ISelectionBinding
objectTypes.Add(modelObject.GetType().Name);
}
// Filter out the objects that Tekla API ignores (e.g. Construction objects with "000000.." GUID)
List<string> filteredObjectIds = objectIds
.Where(id => _model.SelectModelObject(new Identifier(new Guid(id))) != null)
.ToList();
string typesString = string.Join(", ", objectTypes.Distinct());
return new SelectionInfo(
filteredObjectIds,
filteredObjectIds.Count == 0 ? "No objects selected." : $"{filteredObjectIds.Count} objects ({typesString})"
objectIds,
objectIds.Count == 0 ? "No objects selected." : $"{objectIds.Count} objects ({typesString})"
);
}
}
@@ -13,7 +13,6 @@
<ItemGroup>
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Common.MeshTriangulation\Speckle.Common.MeshTriangulation.csproj" />
</ItemGroup>
<ItemGroup>
@@ -9,7 +9,7 @@ public sealed class DisplayValueExtractor
private readonly ITypedConverter<ACG.MapPoint, SOG.Point> _pointConverter;
private readonly ITypedConverter<ACG.Multipoint, IReadOnlyList<SOG.Point>> _multiPointConverter;
private readonly ITypedConverter<ACG.Polyline, IReadOnlyList<SOG.Polyline>> _polylineConverter;
private readonly ITypedConverter<ACG.Polygon, IReadOnlyList<SOG.Region>> _polygonConverter;
private readonly ITypedConverter<ACG.Polygon, IReadOnlyList<SOG.Polyline>> _polygonConverter;
private readonly ITypedConverter<ACG.Multipatch, IReadOnlyList<SOG.Mesh>> _multipatchConverter;
private readonly ITypedConverter<ACD.Raster.Raster, SOG.Mesh> _gisRasterConverter;
@@ -17,7 +17,7 @@ public sealed class DisplayValueExtractor
ITypedConverter<ACG.MapPoint, SOG.Point> pointConverter,
ITypedConverter<ACG.Multipoint, IReadOnlyList<SOG.Point>> multiPointConverter,
ITypedConverter<ACG.Polyline, IReadOnlyList<SOG.Polyline>> polylineConverter,
ITypedConverter<ACG.Polygon, IReadOnlyList<SOG.Region>> polygonConverter,
ITypedConverter<ACG.Polygon, IReadOnlyList<SOG.Polyline>> polygonConverter,
ITypedConverter<ACG.Multipatch, IReadOnlyList<SOG.Mesh>> multipatchConverter,
ITypedConverter<ACD.Raster.Raster, SOG.Mesh> gisRasterConverter
)
@@ -1,8 +1,4 @@
using Speckle.Common.MeshTriangulation;
using Speckle.Converters.Common;
using Speckle.Converters.Common.Objects;
using Speckle.DoubleNumerics;
using Speckle.Objects;
using Speckle.Sdk.Common.Exceptions;
namespace Speckle.Converters.ArcGIS3.ToSpeckle.Raw;
@@ -11,134 +7,35 @@ namespace Speckle.Converters.ArcGIS3.ToSpeckle.Raw;
/// Converts a Polygon feature to a list of polylines from the polygon boundary and inner loops.
/// This is a placeholder conversion since we don't have a polygon class or meshing strategy for interior loops yet.
/// </summary>
public class PolygonFeatureToSpeckleConverter : ITypedConverter<ACG.Polygon, IReadOnlyList<SOG.Region>>
public class PolygonFeatureToSpeckleConverter : ITypedConverter<ACG.Polygon, IReadOnlyList<SOG.Polyline>>
{
private readonly ITypedConverter<ACG.ReadOnlySegmentCollection, SOG.Polyline> _segmentConverter;
private readonly IConverterSettingsStore<ArcGISConversionSettings> _settingsStore;
public PolygonFeatureToSpeckleConverter(
ITypedConverter<ACG.ReadOnlySegmentCollection, SOG.Polyline> segmentConverter,
IConverterSettingsStore<ArcGISConversionSettings> settingsStore
)
public PolygonFeatureToSpeckleConverter(ITypedConverter<ACG.ReadOnlySegmentCollection, SOG.Polyline> segmentConverter)
{
_segmentConverter = segmentConverter;
_settingsStore = settingsStore;
}
public IReadOnlyList<SOG.Region> Convert(ACG.Polygon target)
public IReadOnlyList<SOG.Polyline> Convert(ACG.Polygon target)
{
// https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic30235.html
int partCount = target.PartCount;
List<SOG.Polyline> parts = new(partCount);
if (partCount == 0)
{
throw new ValidationException("ArcGIS Polygon contains no parts");
}
// declare Region elements
List<SOG.Region> regions = new();
SOG.Polyline? boundary = null;
List<SOG.Polyline> innerLoops = new();
// iterate through polygon parts: can be inner or outer curves,
// can be multiple outer curves too (if multipolygon).
for (int i = 0; i < partCount; i++)
{
// get the part polyline
ACG.ReadOnlySegmentCollection segmentCollection = target.Parts[i];
SOG.Polyline polyline = _segmentConverter.Convert(segmentCollection);
if (!target.IsExteriorRing(i))
{
innerLoops.Add(polyline);
}
else
{
// save previous region (if exists)
if (boundary is not null)
{
regions.Add(CreateRegion(boundary, innerLoops));
}
// reset values to start a new region
boundary = polyline;
innerLoops = [];
}
}
// after all loops, create and add the last region to the list
if (boundary is not null)
{
regions.Add(CreateRegion(boundary, innerLoops));
// POC: we could create a mesh from exterior polyline: target.IsExteriorRing(idx)
parts.Add(polyline);
}
return regions;
}
private SOG.Region CreateRegion(SOG.Polyline boundary, List<SOG.Polyline> innerLoops)
{
// create display mesh from region loops
var allLoops = new List<SOG.Polyline>() { boundary };
allLoops.AddRange(innerLoops);
SOG.Mesh displayMesh = MeshFromLoops(allLoops);
SOG.Region newRegion =
new()
{
boundary = boundary,
innerLoops = innerLoops.Cast<ICurve>().ToList(),
hasHatchPattern = false,
displayValue = [displayMesh],
units = _settingsStore.Current.SpeckleUnits
};
return newRegion;
}
private SOG.Mesh MeshFromLoops(List<SOG.Polyline> loops)
{
// turn Polylines into Polyfaces (boundary will be the first in the list)
var polyFaces = new List<Poly3>();
foreach (var loop in loops)
{
var vertices = new List<Vector3>();
for (int i = 0; i < loop.value.Count; i += 3)
{
vertices.Add(new Vector3(loop.value[i], loop.value[i + 1], loop.value[i + 2]));
}
polyFaces.Add(new Poly3(vertices));
}
var generator = new MeshGenerator(new BaseTransformer(), new LibTessTriangulator());
var mesh3 = generator.TriangulateSurface(polyFaces);
return Mesh3ToSpeckleMesh(mesh3);
}
private SOG.Mesh Mesh3ToSpeckleMesh(Mesh3 mesh3)
{
// copied from Tekla Solid converter, possibly to be moved to Speckle.Common
var vertices = new List<double>();
var faces = new List<int>();
foreach (var v in mesh3.Vertices)
{
vertices.Add(v.X);
vertices.Add(v.Y);
vertices.Add(v.Z);
}
for (int i = 0; i < mesh3.Triangles.Count; i += 3)
{
faces.Add(3);
faces.Add(mesh3.Triangles[i]);
faces.Add(mesh3.Triangles[i + 1]);
faces.Add(mesh3.Triangles[i + 2]);
}
var mesh = new SOG.Mesh
{
vertices = vertices,
faces = faces,
units = _settingsStore.Current.SpeckleUnits
};
return mesh;
return parts;
}
}
@@ -215,26 +215,13 @@
"resolved": "4.5.1",
"contentHash": "Zh8t8oqolRaFa9vmOZfdQm/qKejdqz0J9kr7o2Fu0vPeoH3BL1EOXipKWwkWtLT1JPzjByrF19fGuFlNbmPpiw=="
},
"speckle.common.meshtriangulation": {
"type": "Project",
"dependencies": {
"LibTessDotNet": "[1.1.15, )",
"Speckle.DoubleNumerics": "[4.1.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"LibTessDotNet": {
"type": "CentralTransitive",
"requested": "[1.1.15, )",
"resolved": "1.1.15",
"contentHash": "KuA7N3Nv/lIeawJdQBQJR6oqWD9KETHLbWzBqapwFs+Tby+R5I4crkKujKMm5bXcSuFZ8LNtflFQVadsWCbBjg=="
},
"Microsoft.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
@@ -261,18 +248,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -282,14 +269,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2022.0.2" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2022.0.2" />
</ItemGroup>
<ItemGroup>
@@ -258,7 +258,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"Microsoft.Extensions.Logging": {
@@ -287,18 +287,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -308,14 +308,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" />
</ItemGroup>
<ItemGroup>
@@ -258,7 +258,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"Microsoft.Extensions.Logging": {
@@ -287,18 +287,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -308,14 +308,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" />
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -287,7 +287,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -331,18 +331,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -352,14 +352,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -215,9 +215,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.7, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )",
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui": {
@@ -225,8 +225,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.7, )",
"Speckle.Sdk.Dependencies": "[3.1.7, )"
"Speckle.Sdk": "[3.1.0-dev.270, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.270, )"
}
},
"speckle.connectors.dui.webview": {
@@ -243,7 +243,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.7, )"
"Speckle.Objects": "[3.1.0-dev.270, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -287,18 +287,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "Htg6IeMLTTf8fTaOKEKMPZzrseu4NAtVpiZwVtLhg7ZzdndW8WlsvEyFRShK1o3hxlPsQJOA5qfsTvf5fcz/pQ==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "9lCAC/Hsz2cbTVjwgHixLX2R7TNF8C90xd6rm0LsFPRgx926k15ep4k9q9wXHrblmP5Mc34qD1x9cwrSXzCiaA==",
"dependencies": {
"Speckle.Sdk": "3.1.7"
"Speckle.Sdk": "3.1.0-dev.270"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "oi6fz5fSsWZ+VQiZukpom/fKHRH++Vlyf8a6rlkYQPj6NAqTIV3Rgthalt7Y7wWxGNRIP4KMdGTXvrN7wqCcjA==",
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "dzcd3A5jn4KpcgC8a1VuoLt1RwDvUfazmi5uKbiXuGFuxXMkGbZXr+xmXbyDL1C0HQqm+vZpOBcdSea/Q62/0g==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
@@ -307,14 +307,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.7"
"Speckle.Sdk.Dependencies": "3.1.0-dev.270"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "T7FgbPXh9zI+VkC7f9I5qchtktEhslIOo2xeCm4VKRhImrR7naTmZInQ5MXIZvRfawZlPEg6u0tWzCV1q7ov9g=="
"requested": "[3.1.0-dev.270, )",
"resolved": "3.1.0-dev.270",
"contentHash": "4nkNrmfNwnI+clIgZgBn+M42ISstQs1GrZH/6F97cmU0uczanVy0JTw011vKp5pPGmwZx8QFxVXbvwV5Ofx47A=="
}
}
}
@@ -27,6 +27,7 @@
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\AutocadPolycurveToHostPolyline2dRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\AutocadPolycurveToHostPolyline3dRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\AutocadPolycurveToHostPolylineRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\PolycurveToHostSplineRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Geometry\CircleToHostConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Geometry\ArcToHostConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Geometry\CurveToHostConverter.cs" />

Some files were not shown because too many files have changed in this diff Show More