Compare commits

...

8 Commits

Author SHA1 Message Date
Jedd Morgan b591e82804 Chore: Update csharpier version and re-format (#1363)
* Bump Csharpier

* run csharpier format ./
2026-04-13 17:16:40 +00:00
Björn Steinhagen 0585b531d5 fix(revit): skip out-of-bounds snapping references for far-from-origin DirectShapes (#1362) 2026-04-13 17:52:09 +03:00
Mucahit Bilal GOKER b49884e211 fix(revit): Lighting source material is included in the material quantities (#1361)
* exclude default light source material

* move the check inside TryAddMaterialPropertiesToQuantitiesDict as an early return

* go simple
2026-04-10 15:59:26 +03:00
Björn Steinhagen 1b9640954e fix(revit): apply accumulated transform to curves in linked DirectShapes (#1359)
* fix(revit): apply accumulated transform to curves in linked DirectShape elements

* refactor(revit): pre combine transforms for polylines
2026-04-09 19:19:32 +00:00
Jedd Morgan 3d24a7b16b feat(connectors): disable cache config (#1349) (#1358)
* feat(all): adds disable cache functionality

* feat(connectors): prevents StoreSendResult if cache disabled

* fix(connectors): restores IsBypassed state

* Explicit flag instead implicit

* Delete unused flag

* Add packfile support

---------

Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
Co-authored-by: Björn Steinhagen <88777268+bjoernsteinhagen@users.noreply.github.com>
Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
2026-04-08 11:42:24 +01:00
Jedd Morgan 9f3a333beb Merge remote-tracking branch 'origin/dev' into jrm/main-dev-10 2026-04-08 11:27:57 +01:00
Jedd Morgan 6c2a98c1d4 Update dev from main (#1357) 2026-04-08 10:17:43 +01:00
Jedd Morgan 4cbf5628b1 Merge remote-tracking branch 'origin' into jrm/main-dev-9 2026-04-08 10:11:09 +01:00
374 changed files with 2360 additions and 2271 deletions
+3 -3
View File
@@ -3,14 +3,14 @@
"isRoot": true, "isRoot": true,
"tools": { "tools": {
"csharpier": { "csharpier": {
"version": "0.28.2", "version": "1.2.6",
"commands": [ "commands": [
"dotnet-csharpier" "csharpier"
], ],
"rollForward": false "rollForward": false
}, },
"dotnet-affected": { "dotnet-affected": {
"version": "5.0.0", "version": "6.2.0",
"commands": [ "commands": [
"dotnet-affected" "dotnet-affected"
], ],
+29
View File
@@ -0,0 +1,29 @@
Directory.Build.targets
Directory.Build.props
Directory.Packages.props
*.slnx
**/bin/*
**/obj/*
_ReSharper.SharpCompress/
bin/
*.suo
*.user
TestArchives/Scratch/
TestArchives/Scratch2/
TestResults/
*.nupkg
packages/*/
project.lock.json
tests/TestArchives/Scratch
.vs
tools
.vscode
.idea/
.DS_Store
*.snupkg
coverage.xml
*.received.*
+4 -4
View File
@@ -1,7 +1,7 @@
printWidth: 120 printWidth: 120
useTabs: false useTabs: false
tabWidth: 2 indentSize: 2
preprocessorSymbolSets: preprocessorSymbolSets:
- "" - ""
- "DEBUG" - "DEBUG"
- "DEBUG,CODE_STYLE" - "DEBUG,CODE_STYLE"
-1
View File
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
+5 -5
View File
@@ -20,7 +20,7 @@ public static class Consts
new("Connectors/Revit/Speckle.Connectors.Revit2023", "net48"), new("Connectors/Revit/Speckle.Connectors.Revit2023", "net48"),
new("Connectors/Revit/Speckle.Connectors.Revit2024", "net48"), new("Connectors/Revit/Speckle.Connectors.Revit2024", "net48"),
new("Connectors/Revit/Speckle.Connectors.Revit2025", "net8.0-windows"), new("Connectors/Revit/Speckle.Connectors.Revit2025", "net8.0-windows"),
new("Connectors/Revit/Speckle.Connectors.Revit2026", "net8.0-windows") new("Connectors/Revit/Speckle.Connectors.Revit2026", "net8.0-windows"),
] ]
), ),
new( new(
@@ -30,7 +30,7 @@ public static class Consts
new("Connectors/Autocad/Speckle.Connectors.Autocad2023", "net48"), new("Connectors/Autocad/Speckle.Connectors.Autocad2023", "net48"),
new("Connectors/Autocad/Speckle.Connectors.Autocad2024", "net48"), new("Connectors/Autocad/Speckle.Connectors.Autocad2024", "net48"),
new("Connectors/Autocad/Speckle.Connectors.Autocad2025", "net8.0-windows"), new("Connectors/Autocad/Speckle.Connectors.Autocad2025", "net8.0-windows"),
new("Connectors/Autocad/Speckle.Connectors.Autocad2026", "net8.0-windows") new("Connectors/Autocad/Speckle.Connectors.Autocad2026", "net8.0-windows"),
] ]
), ),
new( new(
@@ -40,7 +40,7 @@ public static class Consts
new("Connectors/Autocad/Speckle.Connectors.Civil3d2023", "net48"), new("Connectors/Autocad/Speckle.Connectors.Civil3d2023", "net48"),
new("Connectors/Autocad/Speckle.Connectors.Civil3d2024", "net48"), new("Connectors/Autocad/Speckle.Connectors.Civil3d2024", "net48"),
new("Connectors/Autocad/Speckle.Connectors.Civil3d2025", "net8.0-windows"), new("Connectors/Autocad/Speckle.Connectors.Civil3d2025", "net8.0-windows"),
new("Connectors/Autocad/Speckle.Connectors.Civil3d2026", "net8.0-windows") new("Connectors/Autocad/Speckle.Connectors.Civil3d2026", "net8.0-windows"),
] ]
), ),
new("plant3d", [new("Connectors/Autocad/Speckle.Connectors.Plant3d2026", "net8.0-windows")]), new("plant3d", [new("Connectors/Autocad/Speckle.Connectors.Plant3d2026", "net8.0-windows")]),
@@ -53,7 +53,7 @@ public static class Consts
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2023", "net48"), new("Connectors/Navisworks/Speckle.Connectors.Navisworks2023", "net48"),
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2024", "net48"), new("Connectors/Navisworks/Speckle.Connectors.Navisworks2024", "net48"),
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2025", "net48"), new("Connectors/Navisworks/Speckle.Connectors.Navisworks2025", "net48"),
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2026", "net48") new("Connectors/Navisworks/Speckle.Connectors.Navisworks2026", "net48"),
] ]
), ),
new( new(
@@ -61,7 +61,7 @@ public static class Consts
[ [
new("Connectors/Tekla/Speckle.Connector.Tekla2023", "net48"), new("Connectors/Tekla/Speckle.Connector.Tekla2023", "net48"),
new("Connectors/Tekla/Speckle.Connector.Tekla2024", "net48"), new("Connectors/Tekla/Speckle.Connector.Tekla2024", "net48"),
new("Connectors/Tekla/Speckle.Connector.Tekla2025", "net48") new("Connectors/Tekla/Speckle.Connector.Tekla2025", "net48"),
] ]
), ),
new( new(
+2 -2
View File
@@ -23,9 +23,9 @@ public static class Github
{ {
Accept = { new MediaTypeWithQualityHeaderValue("application/vnd.github+json") }, Accept = { new MediaTypeWithQualityHeaderValue("application/vnd.github+json") },
Authorization = new AuthenticationHeaderValue("Bearer", token), Authorization = new AuthenticationHeaderValue("Bearer", token),
UserAgent = { new ProductInfoHeaderValue("Speckle.build", "3.0.0") } UserAgent = { new ProductInfoHeaderValue("Speckle.build", "3.0.0") },
}, },
Content = content Content = content,
}; };
request.Headers.Add("X-GitHub-Api-Version", "2022-11-28"); request.Headers.Add("X-GitHub-Api-Version", "2022-11-28");
var response = await client.SendAsync(request); var response = await client.SendAsync(request);
+1 -1
View File
@@ -145,7 +145,7 @@ Target(
DependsOn(RESTORE_TOOLS), DependsOn(RESTORE_TOOLS),
() => () =>
{ {
Run("dotnet", "csharpier --check ."); Run("dotnet", "csharpier check ./");
} }
); );
@@ -7,16 +7,16 @@
<DefineConstants>$(DefineConstants);AUTOCAD;AUTOCAD2022;AUTOCAD2022_OR_GREATER</DefineConstants> <DefineConstants>$(DefineConstants);AUTOCAD;AUTOCAD2022;AUTOCAD2022_OR_GREATER</DefineConstants>
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2022.0.2" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2022.0.2" ExcludeAssets="runtime" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2022\Speckle.Converters.Autocad2022.csproj" /> <ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2022\Speckle.Converters.Autocad2022.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" /> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" /> <ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" /> <Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
</Project> </Project>
@@ -7,16 +7,16 @@
<DefineConstants>$(DefineConstants);AUTOCAD;AUTOCAD2023;AUTOCAD2022_OR_GREATER;AUTOCAD2023_OR_GREATER</DefineConstants> <DefineConstants>$(DefineConstants);AUTOCAD;AUTOCAD2023;AUTOCAD2022_OR_GREATER;AUTOCAD2023_OR_GREATER</DefineConstants>
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" ExcludeAssets="runtime" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2023\Speckle.Converters.Autocad2023.csproj" /> <ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2023\Speckle.Converters.Autocad2023.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" /> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" /> <ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" /> <Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
</Project> </Project>
@@ -7,16 +7,16 @@
<DefineConstants>$(DefineConstants);AUTOCAD;AUTOCAD2024;AUTOCAD2022_OR_GREATER;AUTOCAD2023_OR_GREATER;AUTOCAD2024_OR_GREATER</DefineConstants> <DefineConstants>$(DefineConstants);AUTOCAD;AUTOCAD2024;AUTOCAD2022_OR_GREATER;AUTOCAD2023_OR_GREATER;AUTOCAD2024_OR_GREATER</DefineConstants>
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" ExcludeAssets="runtime" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" ExcludeAssets="runtime"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2024\Speckle.Converters.Autocad2024.csproj" /> <ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2024\Speckle.Converters.Autocad2024.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" /> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" /> <ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" /> <Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
</Project> </Project>
@@ -8,20 +8,23 @@
<PropertyGroup> <PropertyGroup>
<!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting --> <!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <!--This is needed for managed dependencies--> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <!--This is needed for the rest--> <!--This is needed for managed dependencies-->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> <!--This is needed just to keep folder paths the same as the netframework versions of autocad/civil--> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<!--This is needed for the rest-->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<!--This is needed just to keep folder paths the same as the netframework versions of autocad/civil-->
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2025.0.0" ExcludeAssets="runtime" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2025.0.0" ExcludeAssets="runtime"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2025\Speckle.Converters.Autocad2025.csproj" /> <ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2025\Speckle.Converters.Autocad2025.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" /> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" /> <ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" /> <Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
</Project> </Project>
@@ -8,20 +8,23 @@
<PropertyGroup> <PropertyGroup>
<!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting --> <!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <!--This is needed for managed dependencies--> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <!--This is needed for the rest--> <!--This is needed for managed dependencies-->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> <!--This is needed just to keep folder paths the same as the netframework versions of autocad/civil--> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<!--This is needed for the rest-->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<!--This is needed just to keep folder paths the same as the netframework versions of autocad/civil-->
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2026.0.0" ExcludeAssets="runtime" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2026.0.0" ExcludeAssets="runtime"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2026\Speckle.Converters.Autocad2026.csproj" /> <ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2026\Speckle.Converters.Autocad2026.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" /> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" /> <ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" /> <Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
</Project> </Project>
@@ -110,22 +110,20 @@ public class AutocadColorUnpacker
string name = color.ColorNameForDisplay; string name = color.ColorNameForDisplay;
string id = color.GetSpeckleApplicationId(); string id = color.GetSpeckleApplicationId();
ColorProxy colorProxy = ColorProxy colorProxy = new()
new() {
{ value = argb,
value = argb, applicationId = id,
applicationId = id, name = name,
name = name, objects = new(),
objects = new() };
};
// add the color source as well for receiving in other apps // add the color source as well for receiving in other apps
// POC: in order to support full fidelity color support across autocad and rhino, we need to keep track of the color source property. Not sure if this is the best place to keep track of the source, vs on a ColorSourceProxy or as a property on the atomic object. // POC: in order to support full fidelity color support across autocad and rhino, we need to keep track of the color source property. Not sure if this is the best place to keep track of the source, vs on a ColorSourceProxy or as a property on the atomic object.
colorProxy["source"] = color.IsByBlock colorProxy["source"] =
? "block" color.IsByBlock ? "block"
: color.IsByLayer : color.IsByLayer ? "layer"
? "layer" : "object";
: "object";
// set additional properties if by aci or by block // set additional properties if by aci or by block
// ByBlock colors for some reason do not have their color value set to the correct color (white): instead it's a near-black // ByBlock colors for some reason do not have their color value set to the correct color (white): instead it's a near-black
@@ -53,7 +53,7 @@ public class AutocadGroupUnpacker
{ {
applicationId = groupAppId, applicationId = groupAppId,
name = group.Name, name = group.Name,
objects = [applicationId] objects = [applicationId],
}; };
} }
} }
@@ -139,7 +139,7 @@ public class AutocadInstanceBaker : IInstanceBaker<IReadOnlyCollection<Entity>>
? matId ? matId
: ObjectId.Null; : ObjectId.Null;
BlockReference blockRef = new(insertionPoint, definitionId) { BlockTransform = matrix3d, Layer = layerName, }; BlockReference blockRef = new(insertionPoint, definitionId) { BlockTransform = matrix3d, Layer = layerName };
if (objColor is not null) if (objColor is not null)
{ {
@@ -252,7 +252,7 @@ public class AutocadInstanceBaker : IInstanceBaker<IReadOnlyCollection<Entity>>
matrix.M41, matrix.M41,
matrix.M42, matrix.M42,
matrix.M43, matrix.M43,
matrix.M44 matrix.M44,
}; };
var m3d = new Matrix3d(scaledTransform); var m3d = new Matrix3d(scaledTransform);
@@ -291,7 +291,7 @@ public class AutocadInstanceBaker : IInstanceBaker<IReadOnlyCollection<Entity>>
0.0, 0.0,
0.0, 0.0,
0.0, 0.0,
matrix[3, 3] matrix[3, 3],
]; ];
} }
} }
@@ -68,15 +68,14 @@ public class AutocadInstanceUnpacker : IInstanceUnpacker<AutocadRootObject>
: instance.BlockTableRecord; : instance.BlockTableRecord;
// transforms on instances are always stored in WCS // transforms on instances are always stored in WCS
InstanceProxy instanceProxy = InstanceProxy instanceProxy = new()
new() {
{ applicationId = instanceId,
applicationId = instanceId, definitionId = definitionId.ToString(),
definitionId = definitionId.ToString(), maxDepth = depth,
maxDepth = depth, transform = TransformHelper.ConvertToInstanceMatrix4x4(instance.BlockTransform),
transform = TransformHelper.ConvertToInstanceMatrix4x4(instance.BlockTransform), units = _unitsConverter.ConvertOrThrow(Application.DocumentManager.CurrentDocument.Database.Insunits),
units = _unitsConverter.ConvertOrThrow(Application.DocumentManager.CurrentDocument.Database.Insunits) };
};
var properties = _propertiesExtractor.GetProperties(instance); var properties = _propertiesExtractor.GetProperties(instance);
if (properties?.Count > 0) if (properties?.Count > 0)
@@ -153,7 +152,7 @@ public class AutocadInstanceUnpacker : IInstanceUnpacker<AutocadRootObject>
applicationId = definitionId.ToString(), applicationId = definitionId.ToString(),
objects = new(), objects = new(),
maxDepth = depth, maxDepth = depth,
name = !instance.AnonymousBlockTableRecord.IsNull ? "Dynamic instance " + definitionId : definition.Name name = !instance.AnonymousBlockTableRecord.IsNull ? "Dynamic instance " + definitionId : definition.Name,
}; };
// Go through each definition object // Go through each definition object
@@ -170,13 +170,12 @@ public class AutocadMaterialBaker : IAutocadMaterialBaker
MaterialColor diffuseColor = new(Method.Override, 1, entityDiffuseColor); MaterialColor diffuseColor = new(Method.Override, 1, entityDiffuseColor);
MaterialDiffuseComponent diffuse = new(diffuseColor, map); MaterialDiffuseComponent diffuse = new(diffuseColor, map);
Material mat = Material mat = new()
new() {
{ Name = matName,
Name = matName, Opacity = opacity,
Opacity = opacity, Diffuse = diffuse,
Diffuse = diffuse };
};
if (renderMaterial["reflectivity"] is double reflectivity) if (renderMaterial["reflectivity"] is double reflectivity)
{ {
@@ -122,14 +122,13 @@ public class AutocadMaterialUnpacker
diffuseColor.Blue diffuseColor.Blue
); );
RenderMaterial renderMaterial = RenderMaterial renderMaterial = new()
new() {
{ name = material.Name,
name = material.Name, opacity = material.Opacity.Percentage,
opacity = material.Opacity.Percentage, diffuse = diffuse.ToArgb(),
diffuse = diffuse.ToArgb(), applicationId = id,
applicationId = id };
};
// Add additional properties // Add additional properties
renderMaterial["ior"] = material.Refraction.Index; renderMaterial["ior"] = material.Refraction.Index;
@@ -139,7 +138,7 @@ public class AutocadMaterialUnpacker
{ {
value = renderMaterial, value = renderMaterial,
objects = new(), objects = new(),
applicationId = id applicationId = id,
}; };
} }
} }
@@ -74,14 +74,13 @@ public abstract class AutocadContinuousTraversalBaseBuilder : IRootContinuousTra
) )
{ {
// 0 - Init the root // 0 - Init the root
Collection root = Collection root = new()
new() {
{ name = Application
name = Application .DocumentManager.CurrentDocument.Name.Split(_documentPathSeparator, StringSplitOptions.None)
.DocumentManager.CurrentDocument.Name.Split(_documentPathSeparator, StringSplitOptions.None) .Reverse()
.Reverse() .First(),
.First() };
};
Document doc = Application.DocumentManager.CurrentDocument; Document doc = Application.DocumentManager.CurrentDocument;
using Transaction tr = doc.Database.TransactionManager.StartTransaction(); using Transaction tr = doc.Database.TransactionManager.StartTransaction();
@@ -73,15 +73,14 @@ public abstract class AutocadRootObjectBaseBuilder : IRootObjectBuilder<AutocadR
) )
{ {
// 0 - Init the root // 0 - Init the root
Collection root = Collection root = new()
new() {
{ name = Application
name = Application .DocumentManager.CurrentDocument.Name // POC: https://spockle.atlassian.net/browse/CNX-9319
.DocumentManager.CurrentDocument.Name // POC: https://spockle.atlassian.net/browse/CNX-9319 .Split(_documentPathSeparator, StringSplitOptions.None)
.Split(_documentPathSeparator, StringSplitOptions.None) .Reverse()
.Reverse() .First(),
.First() };
};
// TODO: better handling for document and transactions!! // TODO: better handling for document and transactions!!
Document doc = Application.DocumentManager.CurrentDocument; Document doc = Application.DocumentManager.CurrentDocument;
@@ -37,7 +37,7 @@ public class AutocadCommand
PaletteSet = new PaletteSet($"Speckle", s_id) PaletteSet = new PaletteSet($"Speckle", s_id)
{ {
Size = new Size(400, 500), Size = new Size(400, 500),
DockEnabled = (DockSides)((int)DockSides.Left + (int)DockSides.Right) DockEnabled = (DockSides)((int)DockSides.Left + (int)DockSides.Right),
}; };
// init DI // init DI
@@ -53,13 +53,12 @@ public class AutocadRibbon
RibbonPanel panel = new() { Source = source }; RibbonPanel panel = new() { Source = source };
tab.Panels.Add(panel); tab.Panels.Add(panel);
RibbonToolTip speckleToolTip = RibbonToolTip speckleToolTip = new()
new() {
{ Title = "Speckle",
Title = "Speckle", Content = $"Next Gen Speckle Connector for {AppUtils.App.Name}",
Content = $"Next Gen Speckle Connector for {AppUtils.App.Name}", IsHelpEnabled = true, // Without this "Press F1 for help" does not appear in the tooltip
IsHelpEnabled = true // Without this "Press F1 for help" does not appear in the tooltip };
};
_ = CreateSpeckleButton("Speckle", source, null, speckleToolTip, "logo"); _ = CreateSpeckleButton("Speckle", source, null, speckleToolTip, "logo");
} }
@@ -121,7 +120,7 @@ public class AutocadRibbon
ShowText = true, ShowText = true,
ToolTip = tooltip, ToolTip = tooltip,
HelpSource = new System.Uri("https://speckle.guide/user/autocadcivil.html"), HelpSource = new System.Uri("https://speckle.guide/user/autocadcivil.html"),
Size = RibbonItemSize.Large Size = RibbonItemSize.Large,
}; };
if (TryLoadPngImgSource(imageName + "16.png", out ImageSource? imageSource)) if (TryLoadPngImgSource(imageName + "16.png", out ImageSource? imageSource))
@@ -1,79 +1,61 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ApplicationPackage <ApplicationPackage
SchemaVersion="1.0" SchemaVersion="1.0"
AppVersion="1.0" AppVersion="1.0"
Author="AEC SYSTEMS LTD" Author="AEC SYSTEMS LTD"
Name="Speckle for AutoCAD" Name="Speckle for AutoCAD"
Description="Speckle for AutoCAD" Description="Speckle for AutoCAD"
Icon="./Contents/Resources/Logo.ico" Icon="./Contents/Resources/Logo.ico"
ProductCode="{958850b9-3782-4e6f-b9b3-1b570e0fcae1}" ProductCode="{958850b9-3782-4e6f-b9b3-1b570e0fcae1}"
UpgradeCode="{274de351-80aa-4972-9b45-6a93f8ce968f}"> <!-- For now, we're not updating the AppVersion & ProductCodes with each version --> UpgradeCode="{274de351-80aa-4972-9b45-6a93f8ce968f}"
>
<CompanyDetails <!-- For now, we're not updating the AppVersion & ProductCodes with each version -->
Name="Speckle"
Url="https://speckle.systems"
Email="support@speckle.systems" />
<Components>
<!-- AutoCAD 2022 -->
<ComponentEntry
AppName="Speckle.Connectors.Autocad2022"
ModuleName="./Contents/Windows/Speckle.Connectors.Autocad2022/Speckle.Connectors.Autocad2022.dll"
LoadOnAutoCADStartup="True">
<RuntimeRequirements
OS="Win64"
Platform="AutoCAD"
SeriesMin="R24.1"
SeriesMax="R24.1" />
</ComponentEntry>
<!-- AutoCAD 2023 --> <CompanyDetails Name="Speckle" Url="https://speckle.systems" Email="support@speckle.systems" />
<ComponentEntry <Components>
AppName="Speckle.Connectors.Autocad2023" <!-- AutoCAD 2022 -->
ModuleName="./Contents/Windows/Speckle.Connectors.Autocad2023/Speckle.Connectors.Autocad2023.dll" <ComponentEntry
LoadOnAutoCADStartup="True"> AppName="Speckle.Connectors.Autocad2022"
<RuntimeRequirements ModuleName="./Contents/Windows/Speckle.Connectors.Autocad2022/Speckle.Connectors.Autocad2022.dll"
OS="Win64" LoadOnAutoCADStartup="True"
Platform="AutoCAD" >
SeriesMin="R24.2" <RuntimeRequirements OS="Win64" Platform="AutoCAD" SeriesMin="R24.1" SeriesMax="R24.1" />
SeriesMax="R24.2" /> </ComponentEntry>
</ComponentEntry>
<!-- AutoCAD 2024 --> <!-- AutoCAD 2023 -->
<ComponentEntry <ComponentEntry
AppName="Speckle.Connectors.Autocad2024" AppName="Speckle.Connectors.Autocad2023"
ModuleName="./Contents/Windows/Speckle.Connectors.Autocad2024/Speckle.Connectors.Autocad2024.dll" ModuleName="./Contents/Windows/Speckle.Connectors.Autocad2023/Speckle.Connectors.Autocad2023.dll"
LoadOnAutoCADStartup="True"> LoadOnAutoCADStartup="True"
<RuntimeRequirements >
OS="Win64" <RuntimeRequirements OS="Win64" Platform="AutoCAD" SeriesMin="R24.2" SeriesMax="R24.2" />
Platform="AutoCAD" </ComponentEntry>
SeriesMin="R24.3"
SeriesMax="R24.3" />
</ComponentEntry>
<!-- AutoCAD 2025 --> <!-- AutoCAD 2024 -->
<ComponentEntry <ComponentEntry
AppName="Speckle.Connectors.Autocad2025" AppName="Speckle.Connectors.Autocad2024"
ModuleName="./Contents/Windows/Speckle.Connectors.Autocad2025/Speckle.Connectors.Autocad2025.dll" ModuleName="./Contents/Windows/Speckle.Connectors.Autocad2024/Speckle.Connectors.Autocad2024.dll"
LoadOnAutoCADStartup="True"> LoadOnAutoCADStartup="True"
<RuntimeRequirements >
OS="Win64" <RuntimeRequirements OS="Win64" Platform="AutoCAD" SeriesMin="R24.3" SeriesMax="R24.3" />
Platform="AutoCAD" </ComponentEntry>
SeriesMin="R25.0"
SeriesMax="R25.0" />
</ComponentEntry>
<!-- AutoCAD 2026 --> <!-- AutoCAD 2025 -->
<ComponentEntry <ComponentEntry
AppName="Speckle.Connectors.Autocad2026" AppName="Speckle.Connectors.Autocad2025"
ModuleName="./Contents/Windows/Speckle.Connectors.Autocad2026/Speckle.Connectors.Autocad2026.dll" ModuleName="./Contents/Windows/Speckle.Connectors.Autocad2025/Speckle.Connectors.Autocad2025.dll"
LoadOnAutoCADStartup="True"> LoadOnAutoCADStartup="True"
<RuntimeRequirements >
OS="Win64" <RuntimeRequirements OS="Win64" Platform="AutoCAD" SeriesMin="R25.0" SeriesMax="R25.0" />
Platform="AutoCAD" </ComponentEntry>
SeriesMin="R25.1"
SeriesMax="R25.1" />
</ComponentEntry>
</Components>
<!-- AutoCAD 2026 -->
<ComponentEntry
AppName="Speckle.Connectors.Autocad2026"
ModuleName="./Contents/Windows/Speckle.Connectors.Autocad2026/Speckle.Connectors.Autocad2026.dll"
LoadOnAutoCADStartup="True"
>
<RuntimeRequirements OS="Win64" Platform="AutoCAD" SeriesMin="R25.1" SeriesMax="R25.1" />
</ComponentEntry>
</Components>
</ApplicationPackage> </ApplicationPackage>
@@ -1,79 +1,61 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ApplicationPackage <ApplicationPackage
SchemaVersion="1.0" SchemaVersion="1.0"
AppVersion="1.0" AppVersion="1.0"
Author="AEC SYSTEMS LTD" Author="AEC SYSTEMS LTD"
Name="Speckle for Civil 3D" Name="Speckle for Civil 3D"
Description="Speckle for Civil 3D" Description="Speckle for Civil 3D"
Icon="./Contents/Resources/Logo.ico" Icon="./Contents/Resources/Logo.ico"
ProductCode="{cecad7b2-daa9-4a9d-941d-737619ffd999}" ProductCode="{cecad7b2-daa9-4a9d-941d-737619ffd999}"
UpgradeCode="{ccf4134d-0e24-4e91-8bf4-781ec7313bef}"> <!-- For now, we're not updating the AppVersion & ProductCodes with each version --> UpgradeCode="{ccf4134d-0e24-4e91-8bf4-781ec7313bef}"
>
<!-- For now, we're not updating the AppVersion & ProductCodes with each version -->
<CompanyDetails <CompanyDetails Name="Speckle" Url="https://speckle.systems" Email="support@speckle.systems" />
Name="Speckle" <Components>
Url="https://speckle.systems" <!-- AutoCAD 2022 -->
Email="support@speckle.systems" /> <ComponentEntry
<Components> AppName="Speckle.Connectors.Civil3d2022"
ModuleName="./Contents/Windows/Speckle.Connectors.Civil3d2022/Speckle.Connectors.Civil3d2022.dll"
LoadOnAutoCADStartup="True"
>
<RuntimeRequirements OS="Win64" Platform="Civil3D" SeriesMin="R24.1" SeriesMax="R24.1" />
</ComponentEntry>
<!-- AutoCAD 2022 --> <!-- AutoCAD 2023 -->
<ComponentEntry <ComponentEntry
AppName="Speckle.Connectors.Civil3d2022" AppName="Speckle.Connectors.Civil3d2023"
ModuleName="./Contents/Windows/Speckle.Connectors.Civil3d2022/Speckle.Connectors.Civil3d2022.dll" ModuleName="./Contents/Windows/Speckle.Connectors.Civil3d2023/Speckle.Connectors.Civil3d2023.dll"
LoadOnAutoCADStartup="True"> LoadOnAutoCADStartup="True"
<RuntimeRequirements >
OS="Win64" <RuntimeRequirements OS="Win64" Platform="Civil3D" SeriesMin="R24.2" SeriesMax="R24.2" />
Platform="Civil3D" </ComponentEntry>
SeriesMin="R24.1"
SeriesMax="R24.1" />
</ComponentEntry>
<!-- AutoCAD 2023 --> <!-- AutoCAD 2024 -->
<ComponentEntry <ComponentEntry
AppName="Speckle.Connectors.Civil3d2023" AppName="Speckle.Connectors.Civil3d2024"
ModuleName="./Contents/Windows/Speckle.Connectors.Civil3d2023/Speckle.Connectors.Civil3d2023.dll" ModuleName="./Contents/Windows/Speckle.Connectors.Civil3d2024/Speckle.Connectors.Civil3d2024.dll"
LoadOnAutoCADStartup="True"> LoadOnAutoCADStartup="True"
<RuntimeRequirements >
OS="Win64" <RuntimeRequirements OS="Win64" Platform="Civil3D" SeriesMin="R24.3" SeriesMax="R24.3" />
Platform="Civil3D" </ComponentEntry>
SeriesMin="R24.2"
SeriesMax="R24.2" />
</ComponentEntry>
<!-- AutoCAD 2024 --> <!-- AutoCAD 2025 -->
<ComponentEntry <ComponentEntry
AppName="Speckle.Connectors.Civil3d2024" AppName="Speckle.Connectors.Civil3d2025"
ModuleName="./Contents/Windows/Speckle.Connectors.Civil3d2024/Speckle.Connectors.Civil3d2024.dll" ModuleName="./Contents/Windows/Speckle.Connectors.Civil3d2025/Speckle.Connectors.Civil3d2025.dll"
LoadOnAutoCADStartup="True"> LoadOnAutoCADStartup="True"
<RuntimeRequirements >
OS="Win64" <RuntimeRequirements OS="Win64" Platform="Civil3D" SeriesMin="R25.0" SeriesMax="R25.0" />
Platform="Civil3D" </ComponentEntry>
SeriesMin="R24.3"
SeriesMax="R24.3" />
</ComponentEntry>
<!-- AutoCAD 2025 -->
<ComponentEntry
AppName="Speckle.Connectors.Civil3d2025"
ModuleName="./Contents/Windows/Speckle.Connectors.Civil3d2025/Speckle.Connectors.Civil3d2025.dll"
LoadOnAutoCADStartup="True">
<RuntimeRequirements
OS="Win64"
Platform="Civil3D"
SeriesMin="R25.0"
SeriesMax="R25.0" />
</ComponentEntry>
<!-- AutoCAD 2026 -->
<ComponentEntry
AppName="Speckle.Connectors.Civil3d2026"
ModuleName="./Contents/Windows/Speckle.Connectors.Civil3d2026/Speckle.Connectors.Civil3d2026.dll"
LoadOnAutoCADStartup="True">
<RuntimeRequirements
OS="Win64"
Platform="Civil3D"
SeriesMin="R25.1"
SeriesMax="R25.1" />
</ComponentEntry>
</Components>
<!-- AutoCAD 2026 -->
<ComponentEntry
AppName="Speckle.Connectors.Civil3d2026"
ModuleName="./Contents/Windows/Speckle.Connectors.Civil3d2026/Speckle.Connectors.Civil3d2026.dll"
LoadOnAutoCADStartup="True"
>
<RuntimeRequirements OS="Win64" Platform="Civil3D" SeriesMin="R25.1" SeriesMax="R25.1" />
</ComponentEntry>
</Components>
</ApplicationPackage> </ApplicationPackage>
@@ -1,31 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ApplicationPackage <ApplicationPackage
SchemaVersion="1.0" SchemaVersion="1.0"
AppVersion="1.0" AppVersion="1.0"
Author="AEC SYSTEMS LTD" Author="AEC SYSTEMS LTD"
Name="Speckle for Plant 3D" Name="Speckle for Plant 3D"
Description="Speckle for Plant 3D" Description="Speckle for Plant 3D"
Icon="./Contents/Resources/Logo.ico" Icon="./Contents/Resources/Logo.ico"
ProductCode="{b91352b6-01db-4084-93c8-684bb231947e}" ProductCode="{b91352b6-01db-4084-93c8-684bb231947e}"
UpgradeCode="{91c7e43f-e962-40e9-85bd-d6bd733b6964}"> UpgradeCode="{91c7e43f-e962-40e9-85bd-d6bd733b6964}"
>
<CompanyDetails <CompanyDetails Name="Speckle" Url="https://speckle.systems" Email="support@speckle.systems" />
Name="Speckle" <Components>
Url="https://speckle.systems" <!-- Plant 3D 2026 -->
Email="support@speckle.systems" /> <ComponentEntry
<Components> AppName="Speckle.Connectors.Plant3d2026"
ModuleName="./Contents/Windows/Speckle.Connectors.Plant3d2026/Speckle.Connectors.Plant3d2026.dll"
<!-- Plant 3D 2026 --> LoadOnAutoCADStartup="True"
<ComponentEntry >
AppName="Speckle.Connectors.Plant3d2026" <RuntimeRequirements OS="Win64" Platform="Plant3D" SeriesMin="R25.1" SeriesMax="R25.1" />
ModuleName="./Contents/Windows/Speckle.Connectors.Plant3d2026/Speckle.Connectors.Plant3d2026.dll" </ComponentEntry>
LoadOnAutoCADStartup="True"> </Components>
<RuntimeRequirements
OS="Win64"
Platform="Plant3D"
SeriesMin="R25.1"
SeriesMax="R25.1" />
</ComponentEntry>
</Components>
</ApplicationPackage> </ApplicationPackage>
@@ -8,16 +8,22 @@
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2022.0.2" ExcludeAssets="runtime"/> <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.Civil3D.API" VersionOverride="2022.0.2" ExcludeAssets="runtime" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2022\Speckle.Converters.Civil3d2022.csproj" /> <ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2022\Speckle.Converters.Civil3d2022.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" /> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" /> <ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="..\..\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" /> <Import
<Import Project="..\..\Autocad\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems" Label="Shared" /> Project="..\..\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems"
Label="Shared"
/>
<Import
Project="..\..\Autocad\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems"
Label="Shared"
/>
</Project> </Project>
@@ -9,16 +9,22 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" ExcludeAssets="runtime"/> <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.Civil3D.API" VersionOverride="2023.0.0" ExcludeAssets="runtime" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2023\Speckle.Converters.Civil3d2023.csproj" /> <ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2023\Speckle.Converters.Civil3d2023.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" /> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" /> <ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="..\..\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" /> <Import
<Import Project="..\..\Autocad\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems" Label="Shared" /> Project="..\..\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems"
Label="Shared"
/>
<Import
Project="..\..\Autocad\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems"
Label="Shared"
/>
</Project> </Project>
@@ -9,16 +9,22 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" ExcludeAssets="runtime"/> <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.Civil3D.API" VersionOverride="2024.0.0" ExcludeAssets="runtime" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2024\Speckle.Converters.Civil3d2024.csproj" /> <ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2024\Speckle.Converters.Civil3d2024.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" /> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" /> <ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="..\..\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" /> <Import
<Import Project="..\..\Autocad\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems" Label="Shared" /> Project="..\..\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems"
Label="Shared"
/>
<Import
Project="..\..\Autocad\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems"
Label="Shared"
/>
</Project> </Project>
@@ -8,23 +8,26 @@
<PropertyGroup> <PropertyGroup>
<!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting --> <!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <!--This is needed for managed dependencies--> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <!--This is needed for the rest--> <!--This is needed for managed dependencies-->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> <!--This is needed just to keep folder paths the same as the netframework versions of autocad/civil--> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<!--This is needed for the rest-->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<!--This is needed just to keep folder paths the same as the netframework versions of autocad/civil-->
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2025.0.0" ExcludeAssets="runtime" />
<PackageReference Include="Speckle.Civil3d.API" VersionOverride="2025.0.0" ExcludeAssets="runtime" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2025.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Civil3d.API" VersionOverride="2025.0.0" ExcludeAssets="runtime"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2025\Speckle.Converters.Civil3d2025.csproj" /> <ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2025\Speckle.Converters.Civil3d2025.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" /> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" /> <ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="..\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems" Label="Shared" /> <Import Project="..\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems" Label="Shared" />
<Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" /> <Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
</Project> </Project>
@@ -8,23 +8,26 @@
<PropertyGroup> <PropertyGroup>
<!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting --> <!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <!--This is needed for managed dependencies--> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <!--This is needed for the rest--> <!--This is needed for managed dependencies-->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> <!--This is needed just to keep folder paths the same as the netframework versions of autocad/civil--> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<!--This is needed for the rest-->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<!--This is needed just to keep folder paths the same as the netframework versions of autocad/civil-->
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2026.0.0" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2026.0.0" ExcludeAssets="runtime" />
<PackageReference Include="Speckle.Civil3d.API" VersionOverride="2026.0.0" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.Civil3d.API" VersionOverride="2026.0.0" ExcludeAssets="runtime" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2026\Speckle.Converters.Civil3d2026.csproj" /> <ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2026\Speckle.Converters.Civil3d2026.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" /> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" /> <ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="..\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems" Label="Shared" /> <Import Project="..\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems" Label="Shared" />
<Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" /> <Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
</Project> </Project>
@@ -281,7 +281,7 @@ public class PropertySetBaker
{ {
AAEC.PropertyData.DataType.Integer => (int)(long)defaultValue, AAEC.PropertyData.DataType.Integer => (int)(long)defaultValue,
AAEC.PropertyData.DataType.AutoIncrement => (int)(long)defaultValue, AAEC.PropertyData.DataType.AutoIncrement => (int)(long)defaultValue,
_ => defaultValue _ => defaultValue,
}; };
propDef.DefaultData = convertedValue; propDef.DefaultData = convertedValue;
@@ -8,14 +8,17 @@
<PropertyGroup> <PropertyGroup>
<!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting --> <!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <!--This is needed for managed dependencies--> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <!--This is needed for the rest--> <!--This is needed for managed dependencies-->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> <!--This is needed just to keep folder paths the same as the netframework versions--> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<!--This is needed for the rest-->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<!--This is needed just to keep folder paths the same as the netframework versions-->
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2026.0.0" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2026.0.0" ExcludeAssets="runtime" />
<PackageReference Include="Speckle.Plant3D.API" VersionOverride="2026.0.0" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.Plant3D.API" VersionOverride="2026.0.0" ExcludeAssets="runtime" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -48,11 +48,10 @@ public class CsiSharedSelectionBinding : ISelectionBinding, IDisposable
{ {
_lastSelection = currentIds; _lastSelection = currentIds;
// ensure UI updates also run on main thread // ensure UI updates also run on main thread
_threadContext.RunOnMain( _threadContext.RunOnMain(() =>
() => _topLevelExceptionHandler.CatchUnhandled(() =>
_topLevelExceptionHandler.CatchUnhandled( Parent.Send(SelectionBindingEvents.SET_SELECTION, currentSelection)
() => Parent.Send(SelectionBindingEvents.SET_SELECTION, currentSelection) )
)
); );
} }
} }
@@ -98,7 +98,7 @@ public class CsiMaterialPropertyExtractor : IMaterialPropertyExtractor
1 => DirectionalSymmetryType.ORTHOTROPIC, 1 => DirectionalSymmetryType.ORTHOTROPIC,
2 => DirectionalSymmetryType.ANISOTROPIC, 2 => DirectionalSymmetryType.ANISOTROPIC,
3 => DirectionalSymmetryType.UNIAXIAL, 3 => DirectionalSymmetryType.UNIAXIAL,
_ => throw new ArgumentException($"Unknown symmetry type: {materialDirectionalSymmetryKey}") _ => throw new ArgumentException($"Unknown symmetry type: {materialDirectionalSymmetryKey}"),
}; };
var mechanicalProperties = properties.EnsureNested(SectionPropertyCategory.MECHANICAL_DATA); var mechanicalProperties = properties.EnsureNested(SectionPropertyCategory.MECHANICAL_DATA);
@@ -24,6 +24,6 @@ public class CsiResultsExtractorFactory
ResultsKey.SPANDREL_FORCES => _serviceProvider.GetRequiredService<CsiSpandrelForceResultsExtractor>(), ResultsKey.SPANDREL_FORCES => _serviceProvider.GetRequiredService<CsiSpandrelForceResultsExtractor>(),
ResultsKey.STORY_DRIFTS => _serviceProvider.GetRequiredService<CsiStoryDriftsResultsExtractor>(), ResultsKey.STORY_DRIFTS => _serviceProvider.GetRequiredService<CsiStoryDriftsResultsExtractor>(),
ResultsKey.STORY_FORCES => _serviceProvider.GetRequiredService<CsiStoryForceResultsExtractor>(), ResultsKey.STORY_FORCES => _serviceProvider.GetRequiredService<CsiStoryForceResultsExtractor>(),
_ => throw new InvalidOperationException($"{resultsKey} not accounted for in CsiResultsExtractorFactory") _ => throw new InvalidOperationException($"{resultsKey} not accounted for in CsiResultsExtractorFactory"),
}; };
} }
@@ -47,20 +47,19 @@ public class CsiShellSectionPropertyExtractor : IShellSectionPropertyExtractor
double[] stiffnessModifiersArray = []; double[] stiffnessModifiersArray = [];
_settingsStore.Current.SapModel.PropArea.GetModifiers(sectionName, ref stiffnessModifiersArray); _settingsStore.Current.SapModel.PropArea.GetModifiers(sectionName, ref stiffnessModifiersArray);
Dictionary<string, object?> modifiers = Dictionary<string, object?> modifiers = new()
new() {
{ ["Membrane f11 Direction"] = stiffnessModifiersArray[0],
["Membrane f11 Direction"] = stiffnessModifiersArray[0], ["Membrane f22 Direction"] = stiffnessModifiersArray[1],
["Membrane f22 Direction"] = stiffnessModifiersArray[1], ["Membrane f12 Direction"] = stiffnessModifiersArray[2],
["Membrane f12 Direction"] = stiffnessModifiersArray[2], ["Bending m11 Direction"] = stiffnessModifiersArray[3],
["Bending m11 Direction"] = stiffnessModifiersArray[3], ["Bending m22 Direction"] = stiffnessModifiersArray[3],
["Bending m22 Direction"] = stiffnessModifiersArray[3], ["Bending m12 Direction"] = stiffnessModifiersArray[4],
["Bending m12 Direction"] = stiffnessModifiersArray[4], ["Shear v13 Direction"] = stiffnessModifiersArray[5],
["Shear v13 Direction"] = stiffnessModifiersArray[5], ["Shear v23 Direction"] = stiffnessModifiersArray[6],
["Shear v23 Direction"] = stiffnessModifiersArray[6], ["Mass"] = stiffnessModifiersArray[7],
["Mass"] = stiffnessModifiersArray[7], ["Weight"] = stiffnessModifiersArray[8],
["Weight"] = stiffnessModifiersArray[8] };
};
var generalData = properties.EnsureNested(SectionPropertyCategory.GENERAL_DATA); var generalData = properties.EnsureNested(SectionPropertyCategory.GENERAL_DATA);
generalData["Modifiers"] = modifiers; generalData["Modifiers"] = modifiers;
@@ -70,14 +70,13 @@ public class CsiContinuousTraversalBuilder : IRootContinuousTraversalBuilder<ICs
string modelFileName = _csiApplicationService.SapModel.GetModelFilename(false) ?? "Unnamed model"; string modelFileName = _csiApplicationService.SapModel.GetModelFilename(false) ?? "Unnamed model";
(string forceUnit, string tempUnit) = GetForceAndTemperatureUnits(); (string forceUnit, string tempUnit) = GetForceAndTemperatureUnits();
Collection rootObjectCollection = Collection rootObjectCollection = new()
new() {
{ name = modelFileName,
name = modelFileName, ["units"] = _converterSettings.Current.SpeckleUnits,
["units"] = _converterSettings.Current.SpeckleUnits, ["forceUnits"] = forceUnit,
["forceUnits"] = forceUnit, ["temperatureUnits"] = tempUnit,
["temperatureUnits"] = tempUnit };
};
List<SendConversionResult> results = new(csiObjects.Count); List<SendConversionResult> results = new(csiObjects.Count);
int count = 0; int count = 0;
@@ -166,7 +165,7 @@ public class CsiContinuousTraversalBuilder : IRootContinuousTraversalBuilder<ICs
CsiShellWrapper shellWrapper => shellWrapper.GetSpeckleApplicationId(_csiApplicationService.SapModel), CsiShellWrapper shellWrapper => shellWrapper.GetSpeckleApplicationId(_csiApplicationService.SapModel),
CsiSolidWrapper solidWrapper => solidWrapper.GetSpeckleApplicationId(_csiApplicationService.SapModel), CsiSolidWrapper solidWrapper => solidWrapper.GetSpeckleApplicationId(_csiApplicationService.SapModel),
CsiLinkWrapper linkWrapper => linkWrapper.GetSpeckleApplicationId(_csiApplicationService.SapModel), CsiLinkWrapper linkWrapper => linkWrapper.GetSpeckleApplicationId(_csiApplicationService.SapModel),
_ => throw new ArgumentException($"Unsupported wrapper type: {csiObject.GetType()}", nameof(csiObject)) _ => throw new ArgumentException($"Unsupported wrapper type: {csiObject.GetType()}", nameof(csiObject)),
}; };
try try
@@ -86,14 +86,13 @@ public class CsiRootObjectBuilder : IRootObjectBuilder<ICsiWrapper>
string modelFileName = _csiApplicationService.SapModel.GetModelFilename(false) ?? "Unnamed model"; string modelFileName = _csiApplicationService.SapModel.GetModelFilename(false) ?? "Unnamed model";
(string forceUnit, string tempUnit) = GetForceAndTemperatureUnits(); (string forceUnit, string tempUnit) = GetForceAndTemperatureUnits();
Collection rootObjectCollection = Collection rootObjectCollection = new()
new() {
{ name = modelFileName,
name = modelFileName, ["units"] = _converterSettings.Current.SpeckleUnits,
["units"] = _converterSettings.Current.SpeckleUnits, ["forceUnits"] = forceUnit,
["forceUnits"] = forceUnit, ["temperatureUnits"] = tempUnit,
["temperatureUnits"] = tempUnit };
};
List<SendConversionResult> results = new(csiObjects.Count); List<SendConversionResult> results = new(csiObjects.Count);
int count = 0; int count = 0;
@@ -180,7 +179,7 @@ public class CsiRootObjectBuilder : IRootObjectBuilder<ICsiWrapper>
CsiShellWrapper shellWrapper => shellWrapper.GetSpeckleApplicationId(_csiApplicationService.SapModel), CsiShellWrapper shellWrapper => shellWrapper.GetSpeckleApplicationId(_csiApplicationService.SapModel),
CsiSolidWrapper solidWrapper => solidWrapper.GetSpeckleApplicationId(_csiApplicationService.SapModel), CsiSolidWrapper solidWrapper => solidWrapper.GetSpeckleApplicationId(_csiApplicationService.SapModel),
CsiLinkWrapper linkWrapper => linkWrapper.GetSpeckleApplicationId(_csiApplicationService.SapModel), CsiLinkWrapper linkWrapper => linkWrapper.GetSpeckleApplicationId(_csiApplicationService.SapModel),
_ => throw new ArgumentException($"Unsupported wrapper type: {csiObject.GetType()}", nameof(csiObject)) _ => throw new ArgumentException($"Unsupported wrapper type: {csiObject.GetType()}", nameof(csiObject)),
}; };
try try
@@ -1,33 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<Platforms>AnyCPU</Platforms>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<ETABSVersion>21</ETABSVersion>
<DefineConstants>$(DefineConstants);ETABS21</DefineConstants>
<EnableDynamicLoading>true</EnableDynamicLoading>
<Configurations>Debug;Release;Local</Configurations>
</PropertyGroup>
<PropertyGroup> <ItemGroup>
<TargetFramework>net48</TargetFramework> <ProjectReference Include="..\..\..\Converters\CSi\Speckle.Converters.ETABS21\Speckle.Converters.ETABS21.csproj" />
<Platforms>AnyCPU</Platforms> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<UseWindowsForms>true</UseWindowsForms> <ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" />
<UseWPF>true</UseWPF> </ItemGroup>
<ETABSVersion>21</ETABSVersion>
<DefineConstants>$(DefineConstants);ETABS21</DefineConstants>
<EnableDynamicLoading>true</EnableDynamicLoading>
<Configurations>Debug;Release;Local</Configurations>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\CSi\Speckle.Converters.ETABS21\Speckle.Converters.ETABS21.csproj" /> <PackageReference
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" /> Include="Speckle.CSI.API"
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" /> PrivateAssets="all"
IncludeAssets="compile; build"
VersionOverride="1.30.0"
/>
</ItemGroup>
</ItemGroup> <ItemGroup>
<Compile Update="Plugin\SpeckleForm.cs" />
</ItemGroup>
<ItemGroup> <Import Project="..\Speckle.Connectors.CSiShared\Speckle.Connectors.CSiShared.projitems" Label="Shared" />
<PackageReference Include="Speckle.CSI.API" PrivateAssets="all" IncludeAssets="compile; build" VersionOverride="1.30.0" />
</ItemGroup>
<ItemGroup>
<Compile Update="Plugin\SpeckleForm.cs" />
</ItemGroup>
<Import Project="..\Speckle.Connectors.CSiShared\Speckle.Connectors.CSiShared.projitems" Label="Shared" />
<Import Project="..\Speckle.Connectors.ETABSShared\Speckle.Connectors.ETABSShared.projitems" Label="Shared" />
<Import Project="..\Speckle.Connectors.ETABSShared\Speckle.Connectors.ETABSShared.projitems" Label="Shared" />
</Project> </Project>
@@ -1,32 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<Platforms>AnyCPU</Platforms>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<ETABSVersion>22</ETABSVersion>
<DefineConstants>$(DefineConstants);ETABS22;ETABS22_OR_GREATER</DefineConstants>
<EnableDynamicLoading>true</EnableDynamicLoading>
<Configurations>Debug;Release;Local</Configurations>
</PropertyGroup>
<PropertyGroup> <ItemGroup>
<TargetFramework>net8.0-windows</TargetFramework> <ProjectReference Include="..\..\..\Converters\CSi\Speckle.Converters.ETABS22\Speckle.Converters.ETABS22.csproj" />
<Platforms>AnyCPU</Platforms> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<UseWindowsForms>true</UseWindowsForms> <ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" />
<UseWPF>true</UseWPF> </ItemGroup>
<ETABSVersion>22</ETABSVersion>
<DefineConstants>$(DefineConstants);ETABS22;ETABS22_OR_GREATER</DefineConstants>
<EnableDynamicLoading>true</EnableDynamicLoading>
<Configurations>Debug;Release;Local</Configurations>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\CSi\Speckle.Converters.ETABS22\Speckle.Converters.ETABS22.csproj" /> <PackageReference Include="Speckle.CSI.API" PrivateAssets="all" IncludeAssets="compile; build" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" /> </ItemGroup>
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Speckle.CSI.API" PrivateAssets="all" IncludeAssets="compile; build" /> <Compile Update="Plugin\SpeckleForm.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <Import Project="..\Speckle.Connectors.CSiShared\Speckle.Connectors.CSiShared.projitems" Label="Shared" />
<Compile Update="Plugin\SpeckleForm.cs" />
</ItemGroup>
<Import Project="..\Speckle.Connectors.CSiShared\Speckle.Connectors.CSiShared.projitems" Label="Shared" />
<Import Project="..\Speckle.Connectors.ETABSShared\Speckle.Connectors.ETABSShared.projitems" Label="Shared" />
<Import Project="..\Speckle.Connectors.ETABSShared\Speckle.Connectors.ETABSShared.projitems" Label="Shared" />
</Project> </Project>
@@ -34,15 +34,14 @@ public class EtabsMaterialUnpacker : IMaterialUnpacker
_etabsMaterialPropertyExtractor.ExtractProperties(name, properties); _etabsMaterialPropertyExtractor.ExtractProperties(name, properties);
// create the material proxy // create the material proxy
GroupProxy materialProxy = GroupProxy materialProxy = new()
new() {
{ id = name,
id = name, name = name,
name = name, applicationId = name,
applicationId = name, objects = sectionIds,
objects = sectionIds, ["properties"] = properties,
["properties"] = properties };
};
yield return materialProxy; yield return materialProxy;
} }
@@ -58,16 +58,15 @@ public class EtabsSectionUnpacker : ISectionUnpacker
} }
// create section proxy // create section proxy
GroupProxy sectionProxy = GroupProxy sectionProxy = new()
new() {
{ id = sectionName,
id = sectionName, name = sectionName,
name = sectionName, applicationId = sectionName,
applicationId = sectionName, objects = frameIds,
objects = frameIds, ["type"] = "Frame Section",
["type"] = "Frame Section", ["properties"] = properties,
["properties"] = properties };
};
yield return sectionProxy; yield return sectionProxy;
} }
@@ -92,16 +91,15 @@ public class EtabsSectionUnpacker : ISectionUnpacker
} }
// create section proxy // create section proxy
GroupProxy sectionProxy = GroupProxy sectionProxy = new()
new() {
{ id = sectionName,
id = sectionName, name = sectionName,
name = sectionName, applicationId = sectionName,
applicationId = sectionName, objects = frameIds,
objects = frameIds, ["type"] = "Shell Section", // since sectionProxies are a flat list, need some way to distinguish from frame
["type"] = "Shell Section", // since sectionProxies are a flat list, need some way to distinguish from frame ["properties"] = properties, // openings will just have an empty dict here
["properties"] = properties // openings will just have an empty dict here };
};
yield return sectionProxy; yield return sectionProxy;
} }
@@ -15,18 +15,17 @@ public class EtabsSendCollectionManager : CsiSendCollectionManager
{ {
private const string DEFAULT_LEVEL = "Unassigned"; private const string DEFAULT_LEVEL = "Unassigned";
private readonly Dictionary<ElementCategory, string> _categoryNames = private readonly Dictionary<ElementCategory, string> _categoryNames = new()
new() {
{ { ElementCategory.COLUMN, "Columns" },
{ ElementCategory.COLUMN, "Columns" }, { ElementCategory.BEAM, "Beams" },
{ ElementCategory.BEAM, "Beams" }, { ElementCategory.BRACE, "Braces" },
{ ElementCategory.BRACE, "Braces" }, { ElementCategory.WALL, "Walls" },
{ ElementCategory.WALL, "Walls" }, { ElementCategory.FLOOR, "Floors" },
{ ElementCategory.FLOOR, "Floors" }, { ElementCategory.RAMP, "Ramps" },
{ ElementCategory.RAMP, "Ramps" }, { ElementCategory.JOINT, "Joints" },
{ ElementCategory.JOINT, "Joints" }, { ElementCategory.OTHER, "Other" },
{ ElementCategory.OTHER, "Other" } };
};
public EtabsSendCollectionManager(IConverterSettingsStore<CsiConversionSettings> converterSettings) public EtabsSendCollectionManager(IConverterSettingsStore<CsiConversionSettings> converterSettings)
: base(converterSettings) { } : base(converterSettings) { }
@@ -108,7 +107,7 @@ public class EtabsSendCollectionManager : CsiSendCollectionManager
("Wall", nameof(ModelObjectType.SHELL)) => ElementCategory.WALL, ("Wall", nameof(ModelObjectType.SHELL)) => ElementCategory.WALL,
("Floor", nameof(ModelObjectType.SHELL)) => ElementCategory.FLOOR, ("Floor", nameof(ModelObjectType.SHELL)) => ElementCategory.FLOOR,
("Ramp", nameof(ModelObjectType.SHELL)) => ElementCategory.RAMP, ("Ramp", nameof(ModelObjectType.SHELL)) => ElementCategory.RAMP,
_ => ElementCategory.OTHER _ => ElementCategory.OTHER,
}; };
} }
@@ -53,7 +53,7 @@ public class EtabsFrameSectionPropertyExtractor : IApplicationFrameSectionProper
"FileName", "FileName",
"FromFile", "FromFile",
"SectInFile", "SectInFile",
"NotAutoFact" "NotAutoFact",
}; };
// get the section type / shape using the dedicated api query (exception to the database approach) // get the section type / shape using the dedicated api query (exception to the database approach)
@@ -9,26 +9,24 @@ public class EtabsMaterialPropertyExtractor : IApplicationMaterialPropertyExtrac
{ {
private readonly IConverterSettingsStore<CsiConversionSettings> _settingsStore; private readonly IConverterSettingsStore<CsiConversionSettings> _settingsStore;
private readonly Dictionary<int, string?> _ssTypeDict = private readonly Dictionary<int, string?> _ssTypeDict = new()
new() {
{ { 0, "User defined" },
{ 0, "User defined" }, { 1, "Parametric - Simple" },
{ 1, "Parametric - Simple" }, { 2, "Parametric - Mander" },
{ 2, "Parametric - Mander" } };
};
private readonly Dictionary<int, string?> _ssHysTypeDict = private readonly Dictionary<int, string?> _ssHysTypeDict = new()
new() {
{ { 0, "Elastic" },
{ 0, "Elastic" }, { 1, "Kinematic" },
{ 1, "Kinematic" }, { 2, "Takeda" },
{ 2, "Takeda" }, { 3, "Pivot" },
{ 3, "Pivot" }, { 4, "Concrete" },
{ 4, "Concrete" }, { 5, "BRB Hardening" },
{ 5, "BRB Hardening" }, { 6, "Degrading" },
{ 6, "Degrading" }, { 7, "Isotropic" },
{ 7, "Isotropic" } };
};
private const int TEMP = 0; private const int TEMP = 0;
@@ -69,7 +69,7 @@ public class EtabsSectionPropertyDefinitionService
{ {
"Frame Section Property Definitions - Summary", "Frame Section Property Definitions - Summary",
"Frame Section Property Definitions - Concrete Beam Reinforcing", "Frame Section Property Definitions - Concrete Beam Reinforcing",
"Frame Section Property Definitions - Concrete Column Reinforcing" "Frame Section Property Definitions - Concrete Column Reinforcing",
}; };
return availableTableKeys.Where(key => return availableTableKeys.Where(key =>
@@ -12,16 +12,19 @@
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>
</PropertyGroup> </PropertyGroup>
<Import Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems" Label="Shared"/> <Import
Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems"
Label="Shared"
/>
<ItemGroup> <ItemGroup>
<Reference Include="WindowsFormsIntegration"/> <Reference Include="WindowsFormsIntegration" />
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2020.0.0" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.Navisworks.API" VersionOverride="2020.0.0" ExcludeAssets="runtime" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2020\Speckle.Converters.Navisworks2020.csproj" /> <ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2020\Speckle.Converters.Navisworks2020.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj"/> <ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj"/> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -12,16 +12,19 @@
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>
</PropertyGroup> </PropertyGroup>
<Import Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems" Label="Shared"/> <Import
Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems"
Label="Shared"
/>
<ItemGroup> <ItemGroup>
<Reference Include="WindowsFormsIntegration"/> <Reference Include="WindowsFormsIntegration" />
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2021.0.0" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.Navisworks.API" VersionOverride="2021.0.0" ExcludeAssets="runtime" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2021\Speckle.Converters.Navisworks2021.csproj" /> <ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2021\Speckle.Converters.Navisworks2021.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj"/> <ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj"/> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -12,16 +12,19 @@
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>
</PropertyGroup> </PropertyGroup>
<Import Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems" Label="Shared"/> <Import
Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems"
Label="Shared"
/>
<ItemGroup> <ItemGroup>
<Reference Include="WindowsFormsIntegration"/> <Reference Include="WindowsFormsIntegration" />
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2022.0.0" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.Navisworks.API" VersionOverride="2022.0.0" ExcludeAssets="runtime" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2022\Speckle.Converters.Navisworks2022.csproj" /> <ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2022\Speckle.Converters.Navisworks2022.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj"/> <ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj"/> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -12,16 +12,19 @@
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>
</PropertyGroup> </PropertyGroup>
<Import Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems" Label="Shared"/> <Import
Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems"
Label="Shared"
/>
<ItemGroup> <ItemGroup>
<Reference Include="WindowsFormsIntegration"/> <Reference Include="WindowsFormsIntegration" />
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2023.0.0" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.Navisworks.API" VersionOverride="2023.0.0" ExcludeAssets="runtime" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2023\Speckle.Converters.Navisworks2023.csproj" /> <ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2023\Speckle.Converters.Navisworks2023.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj"/> <ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj"/> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -11,17 +11,20 @@
<DefineConstants>$(DefineConstants);TRACE;NAVIS2024;NAVIS</DefineConstants> <DefineConstants>$(DefineConstants);TRACE;NAVIS2024;NAVIS</DefineConstants>
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>
</PropertyGroup> </PropertyGroup>
<Import Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems" Label="Shared"/> <Import
Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems"
Label="Shared"
/>
<ItemGroup> <ItemGroup>
<Reference Include="WindowsFormsIntegration"/> <Reference Include="WindowsFormsIntegration" />
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2024.0.0" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.Navisworks.API" VersionOverride="2024.0.0" ExcludeAssets="runtime" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2024\Speckle.Converters.Navisworks2024.csproj" /> <ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2024\Speckle.Converters.Navisworks2024.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj"/> <ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj"/> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -12,17 +12,20 @@
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>
</PropertyGroup> </PropertyGroup>
<Import Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems" Label="Shared"/> <Import
Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems"
Label="Shared"
/>
<ItemGroup> <ItemGroup>
<Reference Include="WindowsFormsIntegration"/> <Reference Include="WindowsFormsIntegration" />
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2025.0.0" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.Navisworks.API" VersionOverride="2025.0.0" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Web.WebView2" VersionOverride="1.0.2045.28" /> <PackageReference Include="Microsoft.Web.WebView2" VersionOverride="1.0.2045.28" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2025\Speckle.Converters.Navisworks2025.csproj" /> <ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2025\Speckle.Converters.Navisworks2025.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj"/> <ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj"/> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -12,18 +12,21 @@
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>
</PropertyGroup> </PropertyGroup>
<Import Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems" Label="Shared"/> <Import
Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems"
Label="Shared"
/>
<ItemGroup> <ItemGroup>
<Reference Include="WindowsFormsIntegration"/> <Reference Include="WindowsFormsIntegration" />
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2026.0.1" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.Navisworks.API" VersionOverride="2026.0.1" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Web.WebView2" VersionOverride="1.0.2365.46" /> <PackageReference Include="Microsoft.Web.WebView2" VersionOverride="1.0.2365.46" />
<PackageReference Include="System.Reactive" VersionOverride="6.0.0" /> <PackageReference Include="System.Reactive" VersionOverride="6.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2026\Speckle.Converters.Navisworks2026.csproj" /> <ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2026\Speckle.Converters.Navisworks2026.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj"/> <ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj"/> <ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -66,7 +66,7 @@ public class NavisworksSendBinding : ISendBinding
[ [
new NavisworksSelectionFilter() { IsDefault = true }, new NavisworksSelectionFilter() { IsDefault = true },
new NavisworksSavedSetsFilter(new ConnectorElementSelectionService()), new NavisworksSavedSetsFilter(new ConnectorElementSelectionService()),
new NavisworksSavedViewsFilter(new ConnectorElementSelectionService()) new NavisworksSavedViewsFilter(new ConnectorElementSelectionService()),
]; ];
public List<ICardSetting> GetSendSettings() => public List<ICardSetting> GetSendSettings() =>
@@ -76,7 +76,7 @@ public class NavisworksSendBinding : ISendBinding
new IncludeInternalPropertiesSetting(false), new IncludeInternalPropertiesSetting(false),
new ConvertHiddenElementsSetting(false), new ConvertHiddenElementsSetting(false),
new PreserveModelHierarchySetting(false), new PreserveModelHierarchySetting(false),
new RevitCategoryMappingSetting(false) new RevitCategoryMappingSetting(false),
]; ];
public async Task Send(string modelCardId) => public async Task Send(string modelCardId) =>
@@ -105,7 +105,7 @@ public class NavisworksColorUnpacker(
value = ColorConverter.NavisworksColorToColor(representationColor).ToArgb(), value = ColorConverter.NavisworksColorToColor(representationColor).ToArgb(),
name = colorName, name = colorName,
applicationId = colorId.ToString(), applicationId = colorId.ToString(),
objects = [finalId] objects = [finalId],
}; };
} }
} }
@@ -75,12 +75,11 @@ public sealed class NavisworksDocumentEvents
{ {
_finalModelCount = ((NAV.Document)sender).Models.Count; _finalModelCount = ((NAV.Document)sender).Models.Count;
_topLevelExceptionHandler.CatchUnhandled( _topLevelExceptionHandler.CatchUnhandled(() =>
() => _idleManager.SubscribeToIdle(
_idleManager.SubscribeToIdle( nameof(ProcessModelStateChangeAsync),
nameof(ProcessModelStateChangeAsync), async () => await ProcessModelStateChangeAsync()
async () => await ProcessModelStateChangeAsync() )
)
); );
} }
@@ -50,8 +50,8 @@ public sealed class NavisworksDocumentModelStore : DocumentModelStore
} }
catch (NAV.Data.DatabaseException ex) catch (NAV.Data.DatabaseException ex)
{ {
_topLevelExceptionHandler.CatchUnhandled( _topLevelExceptionHandler.CatchUnhandled(() =>
() => throw new InvalidOperationException("Failed to write Speckle state to database", ex) throw new InvalidOperationException("Failed to write Speckle state to database", ex)
); );
} }
} }
@@ -78,8 +78,8 @@ public sealed class NavisworksDocumentModelStore : DocumentModelStore
catch (NAV.Data.DatabaseException ex) catch (NAV.Data.DatabaseException ex)
{ {
ClearAndSaveThisState(); // Clear models on failure to avoid stale data ClearAndSaveThisState(); // Clear models on failure to avoid stale data
_topLevelExceptionHandler.CatchUnhandled( _topLevelExceptionHandler.CatchUnhandled(() =>
() => throw new InvalidOperationException("Failed to read Speckle state from database", ex) throw new InvalidOperationException("Failed to read Speckle state from database", ex)
); );
} }
} }
@@ -131,7 +131,7 @@ public class NavisworksMaterialUnpacker(
renderMaterialProxies[renderMaterialId.ToString()] = new RenderMaterialProxy() renderMaterialProxies[renderMaterialId.ToString()] = new RenderMaterialProxy()
{ {
value = CreateRenderMaterial(materialName, renderTransparency, renderColor, renderMaterialId), value = CreateRenderMaterial(materialName, renderTransparency, renderColor, renderMaterialId),
objects = [finalId] objects = [finalId],
}; };
} }
} }
@@ -161,7 +161,7 @@ public class NavisworksMaterialUnpacker(
roughness = 1, roughness = 1,
diffuse = color.ToArgb(), diffuse = color.ToArgb(),
emissive = 0, emissive = 0,
applicationId = applicationId.ToString() applicationId = applicationId.ToString(),
}; };
return speckleRenderMaterial; return speckleRenderMaterial;
@@ -116,7 +116,7 @@ public class NavisworksContinuousTraversalBuilder(
new() new()
{ {
name = NavisworksApp.ActiveDocument.Title ?? "Unnamed model", name = NavisworksApp.ActiveDocument.Title ?? "Unnamed model",
["units"] = converterSettings.Current.Derived.SpeckleUnits ["units"] = converterSettings.Current.Derived.SpeckleUnits,
}; };
private Task<(Dictionary<string, Base?> converted, List<SendConversionResult> results)> ConvertModelItemsAsync( private Task<(Dictionary<string, Base?> converted, List<SendConversionResult> results)> ConvertModelItemsAsync(
@@ -271,7 +271,7 @@ public class NavisworksContinuousTraversalBuilder(
properties = siblingBases.First()["properties"] as Dictionary<string, object?> ?? [], properties = siblingBases.First()["properties"] as Dictionary<string, object?> ?? [],
units = converterSettings.Current.Derived.SpeckleUnits, units = converterSettings.Current.Derived.SpeckleUnits,
applicationId = groupKey, applicationId = groupKey,
["path"] = path ["path"] = path,
}; };
} }
@@ -293,7 +293,7 @@ public class NavisworksContinuousTraversalBuilder(
properties = convertedBase["properties"] as Dictionary<string, object?> ?? [], properties = convertedBase["properties"] as Dictionary<string, object?> ?? [],
units = units.ToString(), units = units.ToString(),
applicationId = convertedBase.applicationId, applicationId = convertedBase.applicationId,
["path"] = path ["path"] = path,
}; };
} }
@@ -350,7 +350,7 @@ public class NavisworksContinuousTraversalBuilder(
name = $"Shared Geometry {groupKeyPath}", name = $"Shared Geometry {groupKeyPath}",
objects = geometries.Select(g => g.applicationId ?? "").Where(id => !string.IsNullOrEmpty(id)).ToList(), objects = geometries.Select(g => g.applicationId ?? "").Where(id => !string.IsNullOrEmpty(id)).ToList(),
applicationId = $"{DEFINITION_ID_PREFIX}{groupKeyPath}", applicationId = $"{DEFINITION_ID_PREFIX}{groupKeyPath}",
maxDepth = 0 maxDepth = 0,
}; };
instanceDefinitionProxies.Add(defProxy); instanceDefinitionProxies.Add(defProxy);
@@ -361,7 +361,7 @@ public class NavisworksContinuousTraversalBuilder(
var geometryDefinitionsCollection = new Collection var geometryDefinitionsCollection = new Collection
{ {
name = "Geometry Definitions", name = "Geometry Definitions",
elements = allDefinitionGeometries elements = allDefinitionGeometries,
}; };
var objectCollection = new Collection { name = "", elements = finalElements }; var objectCollection = new Collection { name = "", elements = finalElements };
@@ -103,7 +103,7 @@ public class NavisworksRootObjectBuilder(
new() new()
{ {
name = NavisworksApp.ActiveDocument.Title ?? "Unnamed model", name = NavisworksApp.ActiveDocument.Title ?? "Unnamed model",
["units"] = converterSettings.Current.Derived.SpeckleUnits ["units"] = converterSettings.Current.Derived.SpeckleUnits,
}; };
private Task<(Dictionary<string, Base?> converted, List<SendConversionResult> results)> ConvertModelItemsAsync( private Task<(Dictionary<string, Base?> converted, List<SendConversionResult> results)> ConvertModelItemsAsync(
@@ -285,7 +285,7 @@ public class NavisworksRootObjectBuilder(
properties = siblingBases.First()["properties"] as Dictionary<string, object?> ?? [], properties = siblingBases.First()["properties"] as Dictionary<string, object?> ?? [],
units = converterSettings.Current.Derived.SpeckleUnits, units = converterSettings.Current.Derived.SpeckleUnits,
applicationId = groupKey, applicationId = groupKey,
["path"] = path ["path"] = path,
}; };
} }
@@ -307,7 +307,7 @@ public class NavisworksRootObjectBuilder(
properties = convertedBase["properties"] as Dictionary<string, object?> ?? [], properties = convertedBase["properties"] as Dictionary<string, object?> ?? [],
units = units.ToString(), units = units.ToString(),
applicationId = convertedBase.applicationId, applicationId = convertedBase.applicationId,
["path"] = path ["path"] = path,
}; };
} }
@@ -373,7 +373,7 @@ public class NavisworksRootObjectBuilder(
name = $"Shared Geometry {groupKeyPath}", name = $"Shared Geometry {groupKeyPath}",
objects = geometries.Select(g => g.applicationId ?? "").Where(id => !string.IsNullOrEmpty(id)).ToList(), objects = geometries.Select(g => g.applicationId ?? "").Where(id => !string.IsNullOrEmpty(id)).ToList(),
applicationId = $"{DEFINITION_ID_PREFIX}{groupKeyPath}", applicationId = $"{DEFINITION_ID_PREFIX}{groupKeyPath}",
maxDepth = 0 maxDepth = 0,
}; };
instanceDefinitionProxies.Add(defProxy); instanceDefinitionProxies.Add(defProxy);
@@ -384,7 +384,7 @@ public class NavisworksRootObjectBuilder(
var geometryDefinitionsCollection = new Collection var geometryDefinitionsCollection = new Collection
{ {
name = "Geometry Definitions", name = "Geometry Definitions",
elements = allDefinitionGeometries elements = allDefinitionGeometries,
}; };
var objectCollection = new Collection { name = "", elements = finalElements }; var objectCollection = new Collection { name = "", elements = finalElements };
@@ -1,17 +1,17 @@
<Page x:Class="Speckle.Connectors.Navisworks.BrowserPane" <Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" x:Class="Speckle.Connectors.Navisworks.BrowserPane"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Speckle.Connectors.DUI;assembly=Speckle.Connectors.DUI" xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
xmlns:local="clr-namespace:Speckle.Connectors.DUI;assembly=Speckle.Connectors.DUI"
mc:Ignorable="d" mc:Ignorable="d"
Title="Panel" Height="450" Width="800"> Title="Panel"
Height="450"
Width="800"
>
<Grid> <Grid>
<cefSharp:ChromiumWebBrowser <cefSharp:ChromiumWebBrowser Name="Browser" Grid.Row="0" Address="{x:Static local:Url.NetlifyString}" />
Name="Browser"
Grid.Row="0"
Address="{x:Static local:Url.NetlifyString}" />
</Grid> </Grid>
</Page> </Page>
@@ -5,7 +5,8 @@
xmlns="clr-namespace:Autodesk.Windows;assembly=AdWindows" xmlns="clr-namespace:Autodesk.Windows;assembly=AdWindows"
xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:gui="clr-namespace:Autodesk.Navisworks.Gui.Roamer.AIRLook;assembly=navisworks.gui.roamer"> xmlns:gui="clr-namespace:Autodesk.Navisworks.Gui.Roamer.AIRLook;assembly=navisworks.gui.roamer"
>
<RibbonTab Id="Speckle" KeyTip="SP"> <RibbonTab Id="Speckle" KeyTip="SP">
<RibbonPanel x:Uid="Panel_Speckle"> <RibbonPanel x:Uid="Panel_Speckle">
<RibbonPanelSource Id="SpeckleV3Source" x:Uid="PanelSource_Speckle_V3" Title="Speckle"> <RibbonPanelSource Id="SpeckleV3Source" x:Uid="PanelSource_Speckle_V3" Title="Speckle">
@@ -15,14 +16,16 @@
Size="Large" Size="Large"
KeyTip="3" KeyTip="3"
ShowText="True" ShowText="True"
Orientation="Vertical" /> Orientation="Vertical"
/>
<gui:NWRibbonButton <gui:NWRibbonButton
x:Uid="Button_Speckle_V2" x:Uid="Button_Speckle_V2"
Id="Speckle_Launch_V2" Id="Speckle_Launch_V2"
Size="Large" Size="Large"
KeyTip="2" KeyTip="2"
ShowText="True" ShowText="True"
Orientation="Vertical" /> Orientation="Vertical"
/>
</RibbonPanelSource> </RibbonPanelSource>
</RibbonPanel> </RibbonPanel>
</RibbonTab> </RibbonTab>
@@ -1,49 +1,82 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage SchemaVersion="1.0" AutodeskProduct="Navisworks" Name="Speckle for Navisworks" <ApplicationPackage
Description="Welcome to Multiplayer BIM." AppVersion="0.1.0" FriendlyVersion="0.1.0"> SchemaVersion="1.0"
<CompanyDetails Name="Speckle"/> AutodeskProduct="Navisworks"
<Components> Name="Speckle for Navisworks"
<RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw23" SeriesMax="Nw23"/> Description="Welcome to Multiplayer BIM."
<ComponentEntry AppName="SpeckleNavisworks" AppType="ManagedPlugin" Version="0.1.0" AppVersion="0.1.0"
ModuleName="./Contents/2026/Speckle.Connectors.Navisworks2026.dll" FriendlyVersion="0.1.0"
AppDescription="Speckle.Connector.Navisworks2026"/> >
</Components> <CompanyDetails Name="Speckle" />
<Components> <Components>
<RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw22" SeriesMax="Nw22"/> <RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw23" SeriesMax="Nw23" />
<ComponentEntry AppName="SpeckleNavisworks" AppType="ManagedPlugin" Version="0.1.0" <ComponentEntry
ModuleName="./Contents/2025/Speckle.Connectors.Navisworks2025.dll" AppName="SpeckleNavisworks"
AppDescription="Speckle.Connector.Navisworks2025"/> AppType="ManagedPlugin"
</Components> Version="0.1.0"
<Components> ModuleName="./Contents/2026/Speckle.Connectors.Navisworks2026.dll"
<RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw21" SeriesMax="Nw21"/> AppDescription="Speckle.Connector.Navisworks2026"
<ComponentEntry AppName="SpeckleNavisworks" AppType="ManagedPlugin" Version="0.1.0" />
ModuleName="./Contents/2024/Speckle.Connectors.Navisworks2024.dll" </Components>
AppDescription="Speckle.Connector.Navisworks2024"/> <Components>
</Components> <RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw22" SeriesMax="Nw22" />
<Components> <ComponentEntry
<RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw20" SeriesMax="Nw20"/> AppName="SpeckleNavisworks"
<ComponentEntry AppName="SpeckleNavisworks" AppType="ManagedPlugin" Version="0.1.0" AppType="ManagedPlugin"
ModuleName="./Contents/2023/Speckle.Connectors.Navisworks2023.dll" Version="0.1.0"
AppDescription="Speckle.Connector.Navisworks2023"/> ModuleName="./Contents/2025/Speckle.Connectors.Navisworks2025.dll"
</Components> AppDescription="Speckle.Connector.Navisworks2025"
<Components> />
<RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw19" SeriesMax="Nw19"/> </Components>
<ComponentEntry AppName="SpeckleNavisworks" AppType="ManagedPlugin" Version="0.1.0" <Components>
ModuleName="./Contents/2022/Speckle.Connectors.Navisworks2022.dll" <RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw21" SeriesMax="Nw21" />
AppDescription="Speckle.Connector.Navisworks2022"/> <ComponentEntry
</Components> AppName="SpeckleNavisworks"
<Components> AppType="ManagedPlugin"
<RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw18" SeriesMax="Nw18"/> Version="0.1.0"
<ComponentEntry AppName="SpeckleNavisworks" AppType="ManagedPlugin" Version="0.1.0" ModuleName="./Contents/2024/Speckle.Connectors.Navisworks2024.dll"
ModuleName="./Contents/2021/Speckle.Connectors.Navisworks2021.dll" AppDescription="Speckle.Connector.Navisworks2024"
AppDescription="Speckle.Connector.Navisworks2021"/> />
</Components> </Components>
<Components> <Components>
<RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw17" SeriesMax="Nw17"/> <RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw20" SeriesMax="Nw20" />
<ComponentEntry AppName="SpeckleNavisworks" AppType="ManagedPlugin" Version="0.1.0" <ComponentEntry
ModuleName="./Contents/2020/Speckle.Connectors.Navisworks2020.dll" AppName="SpeckleNavisworks"
AppDescription="Speckle.Connector.Navisworks2020"/> AppType="ManagedPlugin"
</Components> Version="0.1.0"
ModuleName="./Contents/2023/Speckle.Connectors.Navisworks2023.dll"
AppDescription="Speckle.Connector.Navisworks2023"
/>
</Components>
<Components>
<RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw19" SeriesMax="Nw19" />
<ComponentEntry
AppName="SpeckleNavisworks"
AppType="ManagedPlugin"
Version="0.1.0"
ModuleName="./Contents/2022/Speckle.Connectors.Navisworks2022.dll"
AppDescription="Speckle.Connector.Navisworks2022"
/>
</Components>
<Components>
<RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw18" SeriesMax="Nw18" />
<ComponentEntry
AppName="SpeckleNavisworks"
AppType="ManagedPlugin"
Version="0.1.0"
ModuleName="./Contents/2021/Speckle.Connectors.Navisworks2021.dll"
AppDescription="Speckle.Connector.Navisworks2021"
/>
</Components>
<Components>
<RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw17" SeriesMax="Nw17" />
<ComponentEntry
AppName="SpeckleNavisworks"
AppType="ManagedPlugin"
Version="0.1.0"
ModuleName="./Contents/2020/Speckle.Connectors.Navisworks2020.dll"
AppDescription="Speckle.Connector.Navisworks2020"
/>
</Components>
</ApplicationPackage> </ApplicationPackage>
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net48;net8.0</TargetFrameworks> <TargetFrameworks>net48;net8.0</TargetFrameworks>
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>
@@ -15,16 +14,16 @@
The revit projects will resolve their correct ones The revit projects will resolve their correct ones
--> -->
<ItemGroup Condition="'$(TargetFramework)' == 'net48'"> <ItemGroup Condition="'$(TargetFramework)' == 'net48'">
<PackageReference Include="Speckle.Revit.API" VersionOverride="2022.0.2.1" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.Revit.API" VersionOverride="2022.0.2.1" ExcludeAssets="runtime" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'"> <ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Speckle.Revit.API" VersionOverride="2025.0.0" ExcludeAssets="runtime"/> <PackageReference Include="Speckle.Revit.API" VersionOverride="2025.0.0" ExcludeAssets="runtime" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ILRepack.FullAuto"> <PackageReference Include="ILRepack.FullAuto">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Revit.Async" PrivateAssets="all"/> <PackageReference Include="Revit.Async" PrivateAssets="all" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -15,7 +15,6 @@
<Prefer32bit>false</Prefer32bit> <Prefer32bit>false</Prefer32bit>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch> <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup> </PropertyGroup>
<Import Project="..\Speckle.Connectors.RevitShared\Speckle.Connectors.RevitShared.projitems" Label="Shared" /> <Import Project="..\Speckle.Connectors.RevitShared\Speckle.Connectors.RevitShared.projitems" Label="Shared" />
@@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net48</TargetFramework> <TargetFramework>net48</TargetFramework>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<UseWpf>true</UseWpf> <UseWpf>true</UseWpf>
<RevitVersion>2023</RevitVersion> <RevitVersion>2023</RevitVersion>
<DefineConstants>$(DefineConstants);REVIT2023;REVIT2022_OR_GREATER;REVIT2023_OR_GREATER</DefineConstants> <DefineConstants>$(DefineConstants);REVIT2023;REVIT2022_OR_GREATER;REVIT2023_OR_GREATER</DefineConstants>
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>
@@ -11,7 +11,7 @@
<Import Project="..\Speckle.Connectors.RevitShared\Speckle.Connectors.RevitShared.projitems" Label="Shared" /> <Import Project="..\Speckle.Connectors.RevitShared\Speckle.Connectors.RevitShared.projitems" Label="Shared" />
<Import Project="..\Speckle.Connectors.RevitShared.Cef\Speckle.Connectors.RevitShared.Cef.projitems" Label="Shared" /> <Import Project="..\Speckle.Connectors.RevitShared.Cef\Speckle.Connectors.RevitShared.Cef.projitems" Label="Shared" />
<ItemGroup> <ItemGroup>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
@@ -11,7 +11,7 @@
<Import Project="..\Speckle.Connectors.RevitShared\Speckle.Connectors.RevitShared.projitems" Label="Shared" /> <Import Project="..\Speckle.Connectors.RevitShared\Speckle.Connectors.RevitShared.projitems" Label="Shared" />
<Import Project="..\Speckle.Connectors.RevitShared.Cef\Speckle.Connectors.RevitShared.Cef.projitems" Label="Shared" /> <Import Project="..\Speckle.Connectors.RevitShared.Cef\Speckle.Connectors.RevitShared.Cef.projitems" Label="Shared" />
<ItemGroup> <ItemGroup>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
<UseWpf>true</UseWpf> <UseWpf>true</UseWpf>
<RevitVersion>2025</RevitVersion> <RevitVersion>2025</RevitVersion>
@@ -23,7 +23,12 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="CefSharp.Wpf.NETCore" NoWarn="NU1903" IncludeAssets="compile" VersionOverride="119.4.30.0" /> <PackageReference
Include="CefSharp.Wpf.NETCore"
NoWarn="NU1903"
IncludeAssets="compile"
VersionOverride="119.4.30.0"
/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -1,17 +1,22 @@
<UserControl x:Class="Speckle.Connectors.Revit2026.Plugin.RevitControlWebView" <UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" x:Class="Speckle.Connectors.Revit2026.Plugin.RevitControlWebView"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
d:DesignHeight="450" d:DesignWidth="800"> mc:Ignorable="d"
d:DesignHeight="450"
d:DesignWidth="800"
>
<!-- WebView2 is created lazily --> <!-- WebView2 is created lazily -->
<Border Name="BrowserContainer" Background="White"> <Border Name="BrowserContainer" Background="White">
<TextBlock Name="LoadingText" <TextBlock
Text="Loading Speckle..." Name="LoadingText"
HorizontalAlignment="Center" Text="Loading Speckle..."
VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="14" VerticalAlignment="Center"
Foreground="Gray" /> FontSize="14"
Foreground="Gray"
/>
</Border> </Border>
</UserControl> </UserControl>
@@ -46,7 +46,7 @@ public sealed partial class RevitControlWebView : UserControl, IBrowserScriptExe
CreationProperties = new CoreWebView2CreationProperties { UserDataFolder = "C:\\temp" }, CreationProperties = new CoreWebView2CreationProperties { UserDataFolder = "C:\\temp" },
HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch, HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch,
VerticalAlignment = System.Windows.VerticalAlignment.Stretch, VerticalAlignment = System.Windows.VerticalAlignment.Stretch,
Source = Url.Netlify Source = Url.Netlify,
}; };
_browser.CoreWebView2InitializationCompleted += (sender, args) => _browser.CoreWebView2InitializationCompleted += (sender, args) =>
@@ -16,7 +16,7 @@ public sealed class RevitControlWebViewDockable : UserControl, Autodesk.Revit.UI
data.InitialState = new Autodesk.Revit.UI.DockablePaneState data.InitialState = new Autodesk.Revit.UI.DockablePaneState
{ {
DockPosition = DockPosition.Tabbed, DockPosition = DockPosition.Tabbed,
TabBehind = DockablePanes.BuiltInDockablePanes.ProjectBrowser TabBehind = DockablePanes.BuiltInDockablePanes.ProjectBrowser,
}; };
} }
} }
@@ -1,11 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
<UseWpf>true</UseWpf> <UseWpf>true</UseWpf>
<RevitVersion>2026</RevitVersion> <RevitVersion>2026</RevitVersion>
<DefineConstants>$(DefineConstants);REVIT2026;REVIT2022_OR_GREATER;REVIT2023_OR_GREATER;REVIT2024_OR_GREATER;REVIT2025_OR_GREATER;REVIT2026_OR_GREATER</DefineConstants><CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <DefineConstants>$(DefineConstants);REVIT2026;REVIT2022_OR_GREATER;REVIT2023_OR_GREATER;REVIT2024_OR_GREATER;REVIT2025_OR_GREATER;REVIT2026_OR_GREATER</DefineConstants>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>
</PropertyGroup> </PropertyGroup>
@@ -1,18 +1,17 @@
<Page x:Class="Speckle.Connectors.Revit.CefSharpPanel" <Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" x:Class="Speckle.Connectors.Revit.CefSharpPanel"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Speckle.Connectors.DUI;assembly=Speckle.Connectors.DUI" xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
xmlns:local="clr-namespace:Speckle.Connectors.DUI;assembly=Speckle.Connectors.DUI"
mc:Ignorable="d" mc:Ignorable="d"
Title="Panel" Height="450" Width="800"> Title="Panel"
Height="450"
Width="800"
>
<Grid> <Grid>
<cefSharp:ChromiumWebBrowser <cefSharp:ChromiumWebBrowser Name="Browser" Grid.Row="0" Address="{x:Static local:Url.NetlifyString}" />
Name="Browser"
Grid.Row="0"
Address="{x:Static local:Url.NetlifyString}" />
</Grid> </Grid>
</Page> </Page>
@@ -68,7 +68,7 @@ public partial class CefSharpPanel : Page, Autodesk.Revit.UI.IDockablePaneProvid
data.InitialState = new Autodesk.Revit.UI.DockablePaneState data.InitialState = new Autodesk.Revit.UI.DockablePaneState
{ {
DockPosition = DockPosition.Tabbed, DockPosition = DockPosition.Tabbed,
TabBehind = DockablePanes.BuiltInDockablePanes.ProjectBrowser TabBehind = DockablePanes.BuiltInDockablePanes.ProjectBrowser,
}; };
} }
} }
@@ -163,8 +163,8 @@ internal sealed class RevitParametersBinding : IParametersBinding
} }
catch (Exception ex) catch (Exception ex)
{ {
_topLevelExceptionHandler.CatchUnhandled( _topLevelExceptionHandler.CatchUnhandled(() =>
() => throw new SpeckleException("Failed to apply parameter updates", ex) throw new SpeckleException("Failed to apply parameter updates", ex)
); );
} }
} }
@@ -151,7 +151,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
[ [
new RevitSelectionFilter { IsDefault = true }, new RevitSelectionFilter { IsDefault = true },
new RevitViewsFilter(_revitContext), new RevitViewsFilter(_revitContext),
new RevitCategoriesFilter(_revitContext) new RevitCategoriesFilter(_revitContext),
]; ];
public List<ICardSetting> GetSendSettings() => public List<ICardSetting> GetSendSettings() =>
@@ -161,7 +161,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
new SendParameterNullOrEmptyStringsSetting(), new SendParameterNullOrEmptyStringsSetting(),
new LinkedModelsSetting(), new LinkedModelsSetting(),
new SendRebarsAsVolumetricSetting(), new SendRebarsAsVolumetricSetting(),
new SendAreasAsMeshSetting() new SendAreasAsMeshSetting(),
]; ];
public void CancelSend(string modelCardId) => _cancellationManager.CancelOperation(modelCardId); public void CancelSend(string modelCardId) => _cancellationManager.CancelOperation(modelCardId);
@@ -260,8 +260,8 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
viewFilter.SetContext(_revitContext); viewFilter.SetContext(_revitContext);
} }
var selectedObjects = await _threadContext.RunOnMainAsync( var selectedObjects = await _threadContext.RunOnMainAsync(() =>
() => Task.FromResult(modelCard.SendFilter.NotNull().RefreshObjectIds()) Task.FromResult(modelCard.SendFilter.NotNull().RefreshObjectIds())
); );
var allElements = selectedObjects.Select(uid => document.GetElement(uid)).Where(el => el is not null).ToList(); var allElements = selectedObjects.Select(uid => document.GetElement(uid)).Where(el => el is not null).ToList();
@@ -424,7 +424,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
SpecTypeId.Area, SpecTypeId.Area,
SpecTypeId.Distance, SpecTypeId.Distance,
SpecTypeId.Length, SpecTypeId.Length,
SpecTypeId.Volume SpecTypeId.Volume,
}; };
var units = ""; var units = "";
foreach (var typeId in unitSpecTypeIds) foreach (var typeId in unitSpecTypeIds)
@@ -37,10 +37,9 @@ internal sealed class SelectionBinding : RevitBaseBinding, ISelectionBinding, ID
_selectionTimer.Elapsed += (_, _) => topLevelExceptionHandler.CatchUnhandled(OnSelectionChanged); _selectionTimer.Elapsed += (_, _) => topLevelExceptionHandler.CatchUnhandled(OnSelectionChanged);
_selectionTimer.Start(); _selectionTimer.Start();
#else #else
revitTask.Run( revitTask.Run(() =>
() => _revitContext.UIApplication.NotNull().SelectionChanged += (_, _) =>
_revitContext.UIApplication.NotNull().SelectionChanged += (_, _) => idleManager.SubscribeToIdle(nameof(OnSelectionChanged), OnSelectionChanged)
idleManager.SubscribeToIdle(nameof(OnSelectionChanged), OnSelectionChanged)
); );
#endif #endif
} }
@@ -17,7 +17,7 @@ public class ElementUnpacker
BuiltInCategory.OST_StairsSketchLandingCenterLines, BuiltInCategory.OST_StairsSketchLandingCenterLines,
BuiltInCategory.OST_StairsSketchRiserLines, BuiltInCategory.OST_StairsSketchRiserLines,
BuiltInCategory.OST_RebarSketchLines, BuiltInCategory.OST_RebarSketchLines,
BuiltInCategory.OST_StairsSketchRunLines BuiltInCategory.OST_StairsSketchRunLines,
]; ];
/// <summary> /// <summary>
@@ -30,7 +30,7 @@ public class FamilyMaterialManager
'>', '>',
'?', '?',
'`', '`',
'~' '~',
]; ];
public Dictionary<string, FamilyParameter> FamilyParameters { get; } = []; public Dictionary<string, FamilyParameter> FamilyParameters { get; } = [];
@@ -161,7 +161,7 @@ public class FamilyTransformUtils
{ {
("YZ", mirrorState.X, Autodesk.Revit.DB.Plane.CreateByOriginAndBasis(plane.Origin, plane.YVec, plane.Normal)), ("YZ", mirrorState.X, Autodesk.Revit.DB.Plane.CreateByOriginAndBasis(plane.Origin, plane.YVec, plane.Normal)),
("XZ", mirrorState.Y, Autodesk.Revit.DB.Plane.CreateByOriginAndBasis(plane.Origin, plane.XVec, plane.Normal)), ("XZ", mirrorState.Y, Autodesk.Revit.DB.Plane.CreateByOriginAndBasis(plane.Origin, plane.XVec, plane.Normal)),
("XY", mirrorState.Z, Autodesk.Revit.DB.Plane.CreateByOriginAndBasis(plane.Origin, plane.XVec, plane.YVec)) ("XY", mirrorState.Z, Autodesk.Revit.DB.Plane.CreateByOriginAndBasis(plane.Origin, plane.XVec, plane.YVec)),
}; };
foreach (var (name, _, mirrorPlane) in mirrorOperations.Where(op => op.shouldMirror)) foreach (var (name, _, mirrorPlane) in mirrorOperations.Where(op => op.shouldMirror))
@@ -54,7 +54,7 @@ public class LevelUnpacker
{ {
name = level.Name, name = level.Name,
displayValue = [], displayValue = [],
properties = _propertiesExtractor.GetProperties(level) properties = _propertiesExtractor.GetProperties(level),
}; };
var unitSettings = _converterSettings.Current.Document.GetUnits(); var unitSettings = _converterSettings.Current.Document.GetUnits();
var lengthUnitType = unitSettings.GetFormatOptions(SpecTypeId.Length).GetUnitTypeId(); var lengthUnitType = unitSettings.GetFormatOptions(SpecTypeId.Length).GetUnitTypeId();
@@ -65,7 +65,7 @@ public class LevelUnpacker
{ {
applicationId = level.UniqueId, applicationId = level.UniqueId,
objects = [element.UniqueId], objects = [element.UniqueId],
value = levelDataObject value = levelDataObject,
}; };
} }
} }
@@ -69,7 +69,7 @@ public class ParameterUpdater
"Instance Parameters" => element, "Instance Parameters" => element,
"Type Parameters" => GetTypeElement(element), "Type Parameters" => GetTypeElement(element),
"System Type Parameters" => GetSystemTypeElement(element), "System Type Parameters" => GetSystemTypeElement(element),
_ => null _ => null,
}; };
private DB.Element? GetTypeElement(DB.Element element) private DB.Element? GetTypeElement(DB.Element element)
@@ -222,7 +222,7 @@ public class ParameterUpdater
DB.StorageType.Integer => SetIntegerValue(parameter, newValue), DB.StorageType.Integer => SetIntegerValue(parameter, newValue),
DB.StorageType.Double => SetDoubleValue(parameter, newValue), DB.StorageType.Double => SetDoubleValue(parameter, newValue),
DB.StorageType.ElementId => SetElementIdValue(parameter, newValue), DB.StorageType.ElementId => SetElementIdValue(parameter, newValue),
_ => false _ => false,
}; };
return success ? UpdateResult.Success() : UpdateResult.Fail($"Failed to set parameter value to: {newValue}"); return success ? UpdateResult.Success() : UpdateResult.Fail($"Failed to set parameter value to: {newValue}");
@@ -155,7 +155,7 @@ public sealed class RevitFamilyBaker : IDisposable
{ {
InstanceDefinitionProxy d => d.applicationId ?? d.id.NotNull(), InstanceDefinitionProxy d => d.applicationId ?? d.id.NotNull(),
InstanceProxy i => i.applicationId ?? i.id.NotNull(), InstanceProxy i => i.applicationId ?? i.id.NotNull(),
_ => "unknown" _ => "unknown",
}; };
_logger.LogError(ex, "Failed to process instance component {ComponentId}", componentId); _logger.LogError(ex, "Failed to process instance component {ComponentId}", componentId);
@@ -8,7 +8,6 @@ namespace Speckle.Connectors.Revit.HostApp;
/// <summary> /// <summary>
/// Unpacks Revit Views for sending /// Unpacks Revit Views for sending
/// </summary> /// </summary>
public class ViewUnpacker public class ViewUnpacker
{ {
private readonly ILogger<ViewUnpacker> _logger; private readonly ILogger<ViewUnpacker> _logger;
@@ -6,7 +6,6 @@ namespace Speckle.Connectors.Revit.Operations.Receive;
/// This class will suppress warnings on the Revit UI /// This class will suppress warnings on the Revit UI
/// Currently we use it after Revit receive when we create the group hierarchy /// Currently we use it after Revit receive when we create the group hierarchy
/// </summary> /// </summary>
public class HideWarningsFailuresPreprocessor : IFailuresPreprocessor public class HideWarningsFailuresPreprocessor : IFailuresPreprocessor
{ {
public FailureProcessingResult PreprocessFailures(FailuresAccessor failuresAccessor) public FailureProcessingResult PreprocessFailures(FailuresAccessor failuresAccessor)
@@ -57,8 +57,8 @@ public sealed class RevitHostObjectBuilder(
IProgress<CardProgress> onOperationProgressed, IProgress<CardProgress> onOperationProgressed,
CancellationToken cancellationToken CancellationToken cancellationToken
) => ) =>
threadContext.RunOnMainAsync( threadContext.RunOnMainAsync(() =>
() => Task.FromResult(BuildSync(rootObject, projectName, modelName, onOperationProgressed, cancellationToken)) Task.FromResult(BuildSync(rootObject, projectName, modelName, onOperationProgressed, cancellationToken))
); );
private HostObjectBuilderResult BuildSync( private HostObjectBuilderResult BuildSync(
@@ -130,7 +130,7 @@ public sealed class RevitHostObjectBuilder(
ReferencePointTransform = CalculateNewTransform( ReferencePointTransform = CalculateNewTransform(
currentSettings.ReferencePointTransform, currentSettings.ReferencePointTransform,
referencePointTransformFromRootObject referencePointTransformFromRootObject
) ),
} }
) )
) )
@@ -45,15 +45,8 @@ public class RevitContinuousTraversalBuilder(
CancellationToken cancellationToken CancellationToken cancellationToken
) )
{ {
return await threadContext.RunOnMainAsync( return await threadContext.RunOnMainAsync(async () =>
async () => await BuildMainThread(documentElementContexts, projectId, sendPipeline, onOperationProgressed, cancellationToken)
await BuildMainThread(
documentElementContexts,
projectId,
sendPipeline,
onOperationProgressed,
cancellationToken
)
); );
} }
@@ -75,8 +68,10 @@ public class RevitContinuousTraversalBuilder(
} }
// init the root // init the root
Collection rootObject = Collection rootObject = new()
new() { name = converterSettings.Current.Document.PathName.Split('\\').Last().Split('.').First() }; {
name = converterSettings.Current.Document.PathName.Split('\\').Last().Split('.').First(),
};
rootObject["units"] = converterSettings.Current.SpeckleUnits; rootObject["units"] = converterSettings.Current.SpeckleUnits;
var filteredDocumentsToConvert = new List<DocumentToConvert>(); var filteredDocumentsToConvert = new List<DocumentToConvert>();
@@ -288,7 +283,7 @@ public class RevitContinuousTraversalBuilder(
new Collection() new Collection()
{ {
elements = revitToSpeckleCacheSingleton.GetBaseObjectsForObjects(idsAndSubElementIds), elements = revitToSpeckleCacheSingleton.GetBaseObjectsForObjects(idsAndSubElementIds),
name = "definitionGeometry" name = "definitionGeometry",
} }
); );
@@ -42,8 +42,8 @@ public class RevitRootObjectBuilder(
IProgress<CardProgress> onOperationProgressed, IProgress<CardProgress> onOperationProgressed,
CancellationToken ct CancellationToken ct
) => ) =>
threadContext.RunOnMainAsync( threadContext.RunOnMainAsync(() =>
() => Task.FromResult(BuildSync(documentElementContexts, projectId, onOperationProgressed, ct)) Task.FromResult(BuildSync(documentElementContexts, projectId, onOperationProgressed, ct))
); );
[SuppressMessage("Maintainability", "CA1506:Avoid excessive class coupling")] [SuppressMessage("Maintainability", "CA1506:Avoid excessive class coupling")]
@@ -62,8 +62,10 @@ public class RevitRootObjectBuilder(
} }
// init the root // init the root
Collection rootObject = Collection rootObject = new()
new() { name = converterSettings.Current.Document.PathName.Split('\\').Last().Split('.').First() }; {
name = converterSettings.Current.Document.PathName.Split('\\').Last().Split('.').First(),
};
rootObject["units"] = converterSettings.Current.SpeckleUnits; rootObject["units"] = converterSettings.Current.SpeckleUnits;
var filteredDocumentsToConvert = new List<DocumentToConvert>(); var filteredDocumentsToConvert = new List<DocumentToConvert>();
@@ -269,7 +271,7 @@ public class RevitRootObjectBuilder(
new Collection() new Collection()
{ {
elements = revitToSpeckleCacheSingleton.GetBaseObjectsForObjects(idsAndSubElementIds), elements = revitToSpeckleCacheSingleton.GetBaseObjectsForObjects(idsAndSubElementIds),
name = "definitionGeometry" name = "definitionGeometry",
} }
); );
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<!-- Select the framework(s) you wish to target. <!-- Select the framework(s) you wish to target.
Rhino 6: net45 Rhino 6: net45
@@ -29,8 +28,18 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="GrasshopperAsyncComponent" /> <PackageReference Include="GrasshopperAsyncComponent" />
<PackageReference Include="RhinoCommon" IncludeAssets="compile; build" PrivateAssets="all" VersionOverride="7.13.21348.13001" /> <PackageReference
<PackageReference Include="Grasshopper" IncludeAssets="compile; build" PrivateAssets="all" VersionOverride="7.13.21348.13001" /> Include="RhinoCommon"
IncludeAssets="compile; build"
PrivateAssets="all"
VersionOverride="7.13.21348.13001"
/>
<PackageReference
Include="Grasshopper"
IncludeAssets="compile; build"
PrivateAssets="all"
VersionOverride="7.13.21348.13001"
/>
<PackageReference Include="System.Resources.Extensions" /> <PackageReference Include="System.Resources.Extensions" />
</ItemGroup> </ItemGroup>
@@ -39,6 +48,8 @@
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" /> <ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="..\Speckle.Connectors.GrasshopperShared\Speckle.Connectors.GrasshopperShared.projitems" Label="Shared" /> <Import
Project="..\Speckle.Connectors.GrasshopperShared\Speckle.Connectors.GrasshopperShared.projitems"
Label="Shared"
/>
</Project> </Project>
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<!-- Select the framework(s) you wish to target. <!-- Select the framework(s) you wish to target.
Rhino 6: net45 Rhino 6: net45
@@ -29,8 +28,18 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="GrasshopperAsyncComponent" /> <PackageReference Include="GrasshopperAsyncComponent" />
<PackageReference Include="RhinoCommon" IncludeAssets="compile; build" PrivateAssets="all" VersionOverride="8.9.24194.18121"/> <PackageReference
<PackageReference Include="Grasshopper" IncludeAssets="compile; build" PrivateAssets="all" VersionOverride="8.9.24194.18121"/> Include="RhinoCommon"
IncludeAssets="compile; build"
PrivateAssets="all"
VersionOverride="8.9.24194.18121"
/>
<PackageReference
Include="Grasshopper"
IncludeAssets="compile; build"
PrivateAssets="all"
VersionOverride="8.9.24194.18121"
/>
<PackageReference Include="System.Resources.Extensions" /> <PackageReference Include="System.Resources.Extensions" />
</ItemGroup> </ItemGroup>
@@ -49,7 +58,9 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
</ItemGroup> </ItemGroup>
<Import Project="..\Speckle.Connectors.GrasshopperShared\Speckle.Connectors.GrasshopperShared.projitems" Label="Shared" /> <Import
Project="..\Speckle.Connectors.GrasshopperShared\Speckle.Connectors.GrasshopperShared.projitems"
Label="Shared"
/>
</Project> </Project>
@@ -275,7 +275,7 @@ public abstract class ValueSet<T> : GH_PersistentParam<T>, IGH_InitCodeAware, IG
Nulls = 1 << 0, Nulls = 1 << 0,
Invalids = 1 << 1, Invalids = 1 << 1,
Duplicates = 1 << 2, Duplicates = 1 << 2,
Empty = 1 << 31 Empty = 1 << 31,
}; };
/// <summary> /// <summary>
@@ -790,7 +790,7 @@ public abstract class ValueSet<T> : GH_PersistentParam<T>, IGH_InitCodeAware, IG
{ {
None, None,
Scrolling, Scrolling,
Panning Panning,
} }
ScrollMode _activeScrollMode = ScrollMode.None; ScrollMode _activeScrollMode = ScrollMode.None;
@@ -934,7 +934,7 @@ public abstract class ValueSet<T> : GH_PersistentParam<T>, IGH_InitCodeAware, IG
var primaryFormat = new StringFormat(StringFormatFlags.NoWrap) var primaryFormat = new StringFormat(StringFormatFlags.NoWrap)
{ {
Trimming = StringTrimming.EllipsisCharacter, Trimming = StringTrimming.EllipsisCharacter,
LineAlignment = StringAlignment.Center LineAlignment = StringAlignment.Center,
} }
) )
{ {
@@ -943,7 +943,7 @@ public abstract class ValueSet<T> : GH_PersistentParam<T>, IGH_InitCodeAware, IG
{ {
Trimming = StringTrimming.EllipsisPath, Trimming = StringTrimming.EllipsisPath,
LineAlignment = StringAlignment.Center, LineAlignment = StringAlignment.Center,
Alignment = StringAlignment.Far Alignment = StringAlignment.Far,
} }
) )
{ {
@@ -1170,7 +1170,7 @@ public abstract class ValueSet<T> : GH_PersistentParam<T>, IGH_InitCodeAware, IG
X = nameBounds.X, X = nameBounds.X,
Y = nameBounds.Y + 16, Y = nameBounds.Y + 16,
Width = nameBounds.Width, Width = nameBounds.Width,
Height = nameBounds.Height Height = nameBounds.Height,
}; };
graphics.DrawString(item.Value.TypeName, s_typeNameFont, typeName.Brush, textBounds, typeName.Format); graphics.DrawString(item.Value.TypeName, s_typeNameFont, typeName.Brush, textBounds, typeName.Format);
@@ -1189,7 +1189,7 @@ public abstract class ValueSet<T> : GH_PersistentParam<T>, IGH_InitCodeAware, IG
new PointF(x - 6.5F, y - 0.5F), new PointF(x - 6.5F, y - 0.5F),
new PointF(x, y + 6.0F), new PointF(x, y + 6.0F),
new PointF(x + 9.5F, y - 3.5F), new PointF(x + 9.5F, y - 3.5F),
new PointF(x + 6.5F, y - 6.5F) new PointF(x + 6.5F, y - 6.5F),
}; };
using (var edge = new Pen(color, 1.0F)) using (var edge = new Pen(color, 1.0F))
@@ -1212,7 +1212,7 @@ public abstract class ValueSet<T> : GH_PersistentParam<T>, IGH_InitCodeAware, IG
var pen = new Pen(Color.FromArgb(Math.Min(GH_Canvas.ZoomFadeMedium, 100), color), SCROLLER_WIDTH) var pen = new Pen(Color.FromArgb(Math.Min(GH_Canvas.ZoomFadeMedium, 100), color), SCROLLER_WIDTH)
{ {
StartCap = System.Drawing.Drawing2D.LineCap.Round, StartCap = System.Drawing.Drawing2D.LineCap.Round,
EndCap = System.Drawing.Drawing2D.LineCap.Round EndCap = System.Drawing.Drawing2D.LineCap.Round,
} }
) )
{ {
@@ -1793,7 +1793,7 @@ public abstract class ValueSet<T> : GH_PersistentParam<T>, IGH_InitCodeAware, IG
+ "<a target=\"_blank\" href=\"https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/like-operator#pattern-options\">LikeOperator</a></dd>" + "<a target=\"_blank\" href=\"https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/like-operator#pattern-options\">LikeOperator</a></dd>"
+ @"<dt><b>;</b></dt><dd>Regular expresion, see " + @"<dt><b>;</b></dt><dd>Regular expresion, see "
+ "<a target=\"_blank\" href=\"https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference\">here</a> as reference</dd>" + "<a target=\"_blank\" href=\"https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference\">here</a> as reference</dd>"
+ @"</dl>" + @"</dl>",
}; };
return nTopic.HtmlFormat(); return nTopic.HtmlFormat();
@@ -61,7 +61,7 @@ public abstract class VariableParameterComponentBase : GH_Component, IGH_Variabl
Optional = true, Optional = true,
Access = access, Access = access,
CanInheritNames = true, CanInheritNames = true,
AlwaysInheritNames = AlwaysInheritNames AlwaysInheritNames = AlwaysInheritNames,
}; };
// Subscribe to the parameter's name changes for auto-resizing // Subscribe to the parameter's name changes for auto-resizing
@@ -192,7 +192,7 @@ public class CollectionsByName : GH_Component
{ {
GH_String ghString => ghString.Value, GH_String ghString => ghString.Value,
IGH_Goo goo => goo.ToString(), IGH_Goo goo => goo.ToString(),
_ => nameObj.ToString() _ => nameObj.ToString(),
}; };
/// <summary> /// <summary>
@@ -237,7 +237,7 @@ public class CollectionsByName : GH_Component
Color = null, Color = null,
Material = null, Material = null,
Topology = null, // only set topology on leaf collections Topology = null, // only set topology on leaf collections
ApplicationId = Guid.NewGuid().ToString() ApplicationId = Guid.NewGuid().ToString(),
}; };
currentCollection.Elements.Add(newChild); currentCollection.Elements.Add(newChild);
@@ -102,7 +102,7 @@ public class CreateCollection : VariableParameterComponentBase
Color = null, Color = null,
Material = null, Material = null,
Topology = GrasshopperHelpers.GetParamTopology(inputParam), Topology = GrasshopperHelpers.GetParamTopology(inputParam),
ApplicationId = inputParam.InstanceGuid.ToString() ApplicationId = inputParam.InstanceGuid.ToString(),
}; };
var duplicateNames = new HashSet<string>(); var duplicateNames = new HashSet<string>();
@@ -67,7 +67,7 @@ public class ExpandCollection : GH_Component, IGH_VariableParameterComponent
NickName = "_objs", NickName = "_objs",
Description = Description =
"Some collections may contain a mix of objects and other collections. These are the objects directly contained in this collection.", "Some collections may contain a mix of objects and other collections. These are the objects directly contained in this collection.",
Access = GH_ParamAccess.list Access = GH_ParamAccess.list,
}; };
// Don't use topology for _objects output (always list) // Don't use topology for _objects output (always list)
@@ -90,11 +90,10 @@ public class ExpandCollection : GH_Component, IGH_VariableParameterComponent
{ {
Name = childWrapper.Name, Name = childWrapper.Name,
NickName = nickName, NickName = nickName,
Access = hasInnerCollections Access =
? GH_ParamAccess.item hasInnerCollections ? GH_ParamAccess.item
: topology is null : topology is null ? GH_ParamAccess.list
? GH_ParamAccess.list : GH_ParamAccess.tree,
: GH_ParamAccess.tree
}; };
object outputValue; object outputValue;
@@ -227,7 +226,7 @@ public class ExpandCollection : GH_Component, IGH_VariableParameterComponent
NickName = targetParam.NickName, NickName = targetParam.NickName,
MutableNickName = false, MutableNickName = false,
Access = targetParam.Access, Access = targetParam.Access,
Description = targetParam.Description Description = targetParam.Description,
}; };
Params.RegisterOutputParam(newParam, i); Params.RegisterOutputParam(newParam, i);
needsMaintenance = true; needsMaintenance = true;
@@ -254,7 +253,7 @@ public class ExpandCollection : GH_Component, IGH_VariableParameterComponent
{ {
Name = GH_ComponentParamServer.InventUniqueNickname("ABCD", Params.Input), Name = GH_ComponentParamServer.InventUniqueNickname("ABCD", Params.Input),
MutableNickName = true, MutableNickName = true,
Optional = true Optional = true,
}; };
myParam.NickName = myParam.Name; myParam.NickName = myParam.Name;
return myParam; return myParam;
@@ -21,5 +21,5 @@ public enum ComponentState
Receiving, Receiving,
Ready, Ready,
Sending, Sending,
UpToDate UpToDate,
} }
@@ -112,24 +112,23 @@ public class DeconstructSpeckleParam : GH_Component, IGH_VariableParameterCompon
data switch data switch
{ {
// get children elements from wrapper to override elements prop while parsing // get children elements from wrapper to override elements prop while parsing
SpeckleCollectionWrapperGoo collectionGoo when collectionGoo.Value != null SpeckleCollectionWrapperGoo collectionGoo when collectionGoo.Value != null => ParseSpeckleWrapper(
=> ParseSpeckleWrapper( collectionGoo.Value,
collectionGoo.Value, collectionGoo.Value.Elements.Select(o => ((SpeckleWrapper)o!).CreateGoo()).ToList()
collectionGoo.Value.Elements.Select(o => ((SpeckleWrapper)o!).CreateGoo()).ToList() ),
),
// get geometries from wrapper to override displayValue prop while parsing // get geometries from wrapper to override displayValue prop while parsing
SpeckleDataObjectWrapperGoo dataObjectGoo when dataObjectGoo.Value != null SpeckleDataObjectWrapperGoo dataObjectGoo when dataObjectGoo.Value != null => ParseSpeckleWrapper(
=> ParseSpeckleWrapper( dataObjectGoo.Value,
dataObjectGoo.Value, null,
null, dataObjectGoo.Value.Geometries.Select(o => o.CreateGoo()).ToList()
dataObjectGoo.Value.Geometries.Select(o => o.CreateGoo()).ToList() ),
),
SpeckleGeometryWrapperGoo objectGoo when objectGoo.Value != null => ParseSpeckleWrapper(objectGoo.Value), SpeckleGeometryWrapperGoo objectGoo when objectGoo.Value != null => ParseSpeckleWrapper(objectGoo.Value),
SpeckleBlockInstanceWrapperGoo blockInstanceGoo when blockInstanceGoo.Value != null SpeckleBlockInstanceWrapperGoo blockInstanceGoo when blockInstanceGoo.Value != null => ParseSpeckleWrapper(
=> ParseSpeckleWrapper(blockInstanceGoo.Value), blockInstanceGoo.Value
),
SpeckleBlockDefinitionWrapperGoo blockDef when blockDef.Value != null => ParseSpeckleWrapper(blockDef.Value), SpeckleBlockDefinitionWrapperGoo blockDef when blockDef.Value != null => ParseSpeckleWrapper(blockDef.Value),
@@ -137,7 +136,7 @@ public class DeconstructSpeckleParam : GH_Component, IGH_VariableParameterCompon
SpecklePropertyGroupGoo propGoo when propGoo.Value != null => ParsePropertyGroup(propGoo), SpecklePropertyGroupGoo propGoo when propGoo.Value != null => ParsePropertyGroup(propGoo),
_ => HandleUnsupportedType(data) _ => HandleUnsupportedType(data),
}; };
/// <summary> /// <summary>
@@ -155,7 +154,7 @@ public class DeconstructSpeckleParam : GH_Component, IGH_VariableParameterCompon
{ {
SpecklePropertyGoo prop => prop.Value, SpecklePropertyGoo prop => prop.Value,
SpecklePropertyGroupGoo propGroup => propGroup, SpecklePropertyGroupGoo propGroup => propGroup,
_ => value _ => value,
}; };
// determine access type based on the value // determine access type based on the value
@@ -266,7 +265,7 @@ public class DeconstructSpeckleParam : GH_Component, IGH_VariableParameterCompon
Dictionary<string, object?> dict => CreateDictionaryOutputParam(prop.Key, dict), Dictionary<string, object?> dict => CreateDictionaryOutputParam(prop.Key, dict),
SpeckleWrapper wrapper => CreateOutputParamByKeyValue(prop.Key, wrapper.CreateGoo(), GH_ParamAccess.item), SpeckleWrapper wrapper => CreateOutputParamByKeyValue(prop.Key, wrapper.CreateGoo(), GH_ParamAccess.item),
Base baseValue => CreateOutputParamByKeyValue(prop.Key, ConvertOrCreateWrapper(baseValue), GH_ParamAccess.list), Base baseValue => CreateOutputParamByKeyValue(prop.Key, ConvertOrCreateWrapper(baseValue), GH_ParamAccess.list),
_ => CreateOutputParamByKeyValue(prop.Key, prop.Value, GH_ParamAccess.item) _ => CreateOutputParamByKeyValue(prop.Key, prop.Value, GH_ParamAccess.item),
}; };
/// <summary> /// <summary>
@@ -285,7 +284,7 @@ public class DeconstructSpeckleParam : GH_Component, IGH_VariableParameterCompon
{ {
"elements" when @base is Collection && elements != null => elements, "elements" when @base is Collection && elements != null => elements,
"displayValue" when @base is Speckle.Objects.Data.DataObject && displayValue != null => displayValue, "displayValue" when @base is Speckle.Objects.Data.DataObject && displayValue != null => displayValue,
_ => list _ => list,
}; };
List<object> nativeObjects = new(); List<object> nativeObjects = new();
@@ -342,15 +341,14 @@ public class DeconstructSpeckleParam : GH_Component, IGH_VariableParameterCompon
/// </summary> /// </summary>
private SpeckleGeometryWrapperGoo CreateGeometryWrapper((object geometry, Base @base) converted) private SpeckleGeometryWrapperGoo CreateGeometryWrapper((object geometry, Base @base) converted)
{ {
SpeckleGeometryWrapper wrapper = SpeckleGeometryWrapper wrapper = new()
new() {
{ Base = converted.@base,
Base = converted.@base, GeometryBase = converted.geometry as GeometryBase,
GeometryBase = converted.geometry as GeometryBase, Name = converted.@base["name"] as string ?? "",
Name = converted.@base["name"] as string ?? "", Color = null,
Color = null, Material = null,
Material = null };
};
return new SpeckleGeometryWrapperGoo(wrapper); return new SpeckleGeometryWrapperGoo(wrapper);
} }
@@ -359,28 +357,26 @@ public class DeconstructSpeckleParam : GH_Component, IGH_VariableParameterCompon
/// </summary> /// </summary>
private SpeckleGeometryWrapperGoo CreateFallbackWrapper(Base @base) private SpeckleGeometryWrapperGoo CreateFallbackWrapper(Base @base)
{ {
SpeckleGeometryWrapper wrapper = SpeckleGeometryWrapper wrapper = new()
new() {
{ Base = @base,
Base = @base, GeometryBase = null,
GeometryBase = null, Name = @base[Constants.NAME_PROP] as string ?? "",
Name = @base[Constants.NAME_PROP] as string ?? "", Color = null,
Color = null, Material = null,
Material = null };
};
return new SpeckleGeometryWrapperGoo(wrapper); return new SpeckleGeometryWrapperGoo(wrapper);
} }
private OutputParamWrapper CreateOutputParamByKeyValue(string key, object? value, GH_ParamAccess access) private OutputParamWrapper CreateOutputParamByKeyValue(string key, object? value, GH_ParamAccess access)
{ {
SpeckleOutputParam param = SpeckleOutputParam param = new()
new() {
{ Name = key,
Name = key, NickName = key,
NickName = key, Description = "",
Description = "", Access = access,
Access = access };
};
return new OutputParamWrapper(param, value); return new OutputParamWrapper(param, value);
} }
@@ -397,7 +393,7 @@ public class DeconstructSpeckleParam : GH_Component, IGH_VariableParameterCompon
{ {
Name = GH_ComponentParamServer.InventUniqueNickname("ABCD", Params.Input), Name = GH_ComponentParamServer.InventUniqueNickname("ABCD", Params.Input),
MutableNickName = true, MutableNickName = true,
Optional = true Optional = true,
}; };
myParam.NickName = myParam.Name; myParam.NickName = myParam.Name;
return myParam; return myParam;
@@ -421,7 +417,7 @@ public class DeconstructSpeckleParam : GH_Component, IGH_VariableParameterCompon
Name = newParam.Param.Name, Name = newParam.Param.Name,
NickName = newParam.Param.NickName, NickName = newParam.Param.NickName,
MutableNickName = false, MutableNickName = false,
Access = newParam.Param.Access Access = newParam.Param.Access,
}; };
Params.RegisterOutputParam(param); Params.RegisterOutputParam(param);
} }
@@ -66,7 +66,7 @@ public class ExpandSpeckleProperties : GH_Component, IGH_VariableParameterCompon
{ {
SpecklePropertyGoo prop => prop.Value, SpecklePropertyGoo prop => prop.Value,
SpecklePropertyGroupGoo pg => pg, SpecklePropertyGroupGoo pg => pg,
_ => value _ => value,
}; };
if (!outputParamsDict.TryGetValue(key, out var existingWrapper)) if (!outputParamsDict.TryGetValue(key, out var existingWrapper))
@@ -75,7 +75,7 @@ public class ExpandSpeckleProperties : GH_Component, IGH_VariableParameterCompon
{ {
Name = key, Name = key,
NickName = key, NickName = key,
Access = outputValue is IList ? GH_ParamAccess.list : GH_ParamAccess.item Access = outputValue is IList ? GH_ParamAccess.list : GH_ParamAccess.item,
}; };
outputParamsDict[key] = new OutputParamWrapper(param, outputValue); outputParamsDict[key] = new OutputParamWrapper(param, outputValue);
} }
@@ -115,7 +115,7 @@ public class ExpandSpeckleProperties : GH_Component, IGH_VariableParameterCompon
{ {
SpecklePropertyGoo prop => prop.Value, SpecklePropertyGoo prop => prop.Value,
SpecklePropertyGroupGoo propGroup => propGroup, SpecklePropertyGroupGoo propGroup => propGroup,
_ => value _ => value,
}; };
if (outParam.Access == GH_ParamAccess.item) if (outParam.Access == GH_ParamAccess.item)
@@ -183,7 +183,7 @@ public class ExpandSpeckleProperties : GH_Component, IGH_VariableParameterCompon
Name = targetParam.Name, Name = targetParam.Name,
NickName = targetParam.NickName, NickName = targetParam.NickName,
MutableNickName = false, MutableNickName = false,
Access = targetParam.Access Access = targetParam.Access,
}; };
Params.RegisterOutputParam(newParam, i); Params.RegisterOutputParam(newParam, i);
needsMaintenance = true; needsMaintenance = true;
@@ -223,11 +223,10 @@ public class FilterSpeckleObjects : GH_Component, IGH_VariableParameterComponent
return true; return true;
} }
SpecklePropertyGroupGoo? properties = wrapper is SpeckleDataObjectWrapper dataObjPropWrapper SpecklePropertyGroupGoo? properties =
? dataObjPropWrapper.Properties wrapper is SpeckleDataObjectWrapper dataObjPropWrapper ? dataObjPropWrapper.Properties
: wrapper is SpeckleGeometryWrapper geoPropWrapper : wrapper is SpeckleGeometryWrapper geoPropWrapper ? geoPropWrapper.Properties
? geoPropWrapper.Properties : null;
: null;
if (properties is null) if (properties is null)
{ {
@@ -345,7 +344,7 @@ public class FilterSpeckleObjects : GH_Component, IGH_VariableParameterComponent
NickName = Grasshopper.CentralSettings.CanvasFullNames ? "Application Id" : "aID", // see remarks NickName = Grasshopper.CentralSettings.CanvasFullNames ? "Application Id" : "aID", // see remarks
Description = "Find objects with a matching applicationId", Description = "Find objects with a matching applicationId",
Access = GH_ParamAccess.item, Access = GH_ParamAccess.item,
Optional = true Optional = true,
}; };
} }
@@ -357,7 +356,7 @@ public class FilterSpeckleObjects : GH_Component, IGH_VariableParameterComponent
NickName = Grasshopper.CentralSettings.CanvasFullNames ? "Speckle Id" : "sID", // see remarks NickName = Grasshopper.CentralSettings.CanvasFullNames ? "Speckle Id" : "sID", // see remarks
Description = "Find objects with a matching Speckle id", Description = "Find objects with a matching Speckle id",
Access = GH_ParamAccess.item, Access = GH_ParamAccess.item,
Optional = true Optional = true,
}; };
} }
@@ -68,7 +68,7 @@ public class QuerySpeckleObjects : GH_Component, IGH_VariableParameterComponent
ObjectType.Brep, ObjectType.Brep,
ObjectType.SubD, ObjectType.SubD,
ObjectType.Mesh, ObjectType.Mesh,
ObjectType.Hatch ObjectType.Hatch,
]; ];
private string GetFilterNickName(ObjectType type) => private string GetFilterNickName(ObjectType type) =>
@@ -83,7 +83,7 @@ public class QuerySpeckleObjects : GH_Component, IGH_VariableParameterComponent
ObjectType.SubD => "SubDs", ObjectType.SubD => "SubDs",
ObjectType.Mesh => "Meshes", ObjectType.Mesh => "Meshes",
ObjectType.Hatch => "Hatches", ObjectType.Hatch => "Hatches",
_ => "" _ => "",
}; };
private List<int>? _outputFilterIndices; private List<int>? _outputFilterIndices;
@@ -266,7 +266,7 @@ public class QuerySpeckleObjects : GH_Component, IGH_VariableParameterComponent
Name = filter.ToString(), Name = filter.ToString(),
NickName = GetFilterNickName(filter), NickName = GetFilterNickName(filter),
MutableNickName = false, MutableNickName = false,
Optional = true Optional = true,
}; };
} }

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