Skip to content

Commit

Permalink
adds autocad2024 converter for the civil3d 2024 connector
Browse files Browse the repository at this point in the history
  • Loading branch information
clairekuang committed Jun 24, 2024
1 parent 3914a22 commit f3d823c
Show file tree
Hide file tree
Showing 11 changed files with 935 additions and 4 deletions.
39 changes: 39 additions & 0 deletions All.sln
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Common.T
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.Civil3d2024", "DUI3-DX\Connectors\Autocad\Speckle.Connectors.Civil3d2024\Speckle.Connectors.Civil3d2024.csproj", "{DDBBA313-69A6-40DE-AB3A-79EE5BF32A7E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Autocad2024", "DUI3-DX\Converters\Autocad\Speckle.Converters.Autocad2024\Speckle.Converters.Autocad2024.csproj", "{C9C28F31-1367-438C-83B0-049C3B3A3E3B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Converters.Autocad2024.DependencyInjection", "DUI3-DX\Converters\Autocad\Speckle.Converters.Autocad2024.DependencyInjection\Speckle.Converters.Autocad2024.DependencyInjection.csproj", "{06082BAA-98E8-49B1-9D33-252B126A0561}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug Mac|Any CPU = Debug Mac|Any CPU
Expand Down Expand Up @@ -2843,6 +2847,38 @@ Global
{DDBBA313-69A6-40DE-AB3A-79EE5BF32A7E}.Release|Any CPU.Build.0 = Release|Any CPU
{DDBBA313-69A6-40DE-AB3A-79EE5BF32A7E}.Release|x64.ActiveCfg = Release|Any CPU
{DDBBA313-69A6-40DE-AB3A-79EE5BF32A7E}.Release|x64.Build.0 = Release|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Debug Mac|Any CPU.ActiveCfg = Debug|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Debug Mac|Any CPU.Build.0 = Debug|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Debug Mac|x64.ActiveCfg = Debug|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Debug Mac|x64.Build.0 = Debug|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Debug|x64.ActiveCfg = Debug|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Debug|x64.Build.0 = Debug|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Release Mac|Any CPU.ActiveCfg = Release|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Release Mac|Any CPU.Build.0 = Release|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Release Mac|x64.ActiveCfg = Release|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Release Mac|x64.Build.0 = Release|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Release|Any CPU.Build.0 = Release|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Release|x64.ActiveCfg = Release|Any CPU
{C9C28F31-1367-438C-83B0-049C3B3A3E3B}.Release|x64.Build.0 = Release|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Debug Mac|Any CPU.ActiveCfg = Debug|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Debug Mac|Any CPU.Build.0 = Debug|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Debug Mac|x64.ActiveCfg = Debug|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Debug Mac|x64.Build.0 = Debug|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Debug|Any CPU.Build.0 = Debug|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Debug|x64.ActiveCfg = Debug|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Debug|x64.Build.0 = Debug|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Release Mac|Any CPU.ActiveCfg = Release|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Release Mac|Any CPU.Build.0 = Release|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Release Mac|x64.ActiveCfg = Release|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Release Mac|x64.Build.0 = Release|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Release|Any CPU.ActiveCfg = Release|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Release|Any CPU.Build.0 = Release|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Release|x64.ActiveCfg = Release|Any CPU
{06082BAA-98E8-49B1-9D33-252B126A0561}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -3057,6 +3093,8 @@ Global
{AEC26A0B-25F3-4544-A9D6-A427BFF79250} = {D92751C8-1039-4005-90B2-913E55E0B8BD}
{95E23A97-E5EA-4506-A52C-D3DA9012DA02} = {2E00592E-558D-492D-88F9-3ECEE4C0C7DA}
{DDBBA313-69A6-40DE-AB3A-79EE5BF32A7E} = {743489BF-1941-43D5-8AF9-35C56D0DCC34}
{C9C28F31-1367-438C-83B0-049C3B3A3E3B} = {804E065F-914C-414A-AF84-009312C3CFF6}
{06082BAA-98E8-49B1-9D33-252B126A0561} = {804E065F-914C-414A-AF84-009312C3CFF6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1D43D91B-4F01-4A78-8250-CC6F9BD93A14}
Expand Down Expand Up @@ -3164,6 +3202,7 @@ Global
Objects\Converters\ConverterRevit\ConverterRevitShared\ConverterRevitShared.projitems*{c21a6553-b4ec-4ec3-b82a-c7a83cffb809}*SharedItemsImports = 5
ConnectorRevit\RevitSharedResources\RevitSharedResources.projitems*{c2ba8b6b-72bd-4dab-865f-90c66083bdb2}*SharedItemsImports = 5
Objects\Converters\ConverterNavisworks\ConverterNavisworks\ConverterNavisworksShared.projitems*{c3232ef3-2000-44c6-a330-b94531c9cc83}*SharedItemsImports = 13
DUI3-DX\Converters\Autocad\Speckle.Converters.AutocadShared\Speckle.Converters.AutocadShared.projitems*{c9c28f31-1367-438c-83b0-049c3b3a3e3b}*SharedItemsImports = 5
Objects\Converters\ConverterNavisworks\ConverterNavisworks\ConverterNavisworksShared.projitems*{cafd4eac-75a8-4fc8-94e5-91cadc39f5b3}*SharedItemsImports = 5
Objects\Converters\ConverterRevit\ConverterRevitShared\ConverterRevitShared.projitems*{cc790553-8088-41a9-83cd-b29f7141f408}*SharedItemsImports = 5
Objects\Converters\ConverterNavisworks\ConverterNavisworks\ConverterNavisworksShared.projitems*{cd334556-ba2b-4272-a1eb-628e8152204a}*SharedItemsImports = 5
Expand Down
2 changes: 2 additions & 0 deletions DUI3-DX.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"DUI3-DX\\Converters\\ArcGIS\\Speckle.Converters.ArcGIS3\\Speckle.Converters.ArcGIS3.csproj",
"DUI3-DX\\Converters\\Autocad\\Speckle.Converters.Autocad2023.DependencyInjection\\Speckle.Converters.Autocad2023.DependencyInjection.csproj",
"DUI3-DX\\Converters\\Autocad\\Speckle.Converters.Autocad2023\\Speckle.Converters.Autocad2023.csproj",
"DUI3-DX\\Converters\\Autocad\\Speckle.Converters.Autocad2024.DependencyInjection\\Speckle.Converters.Autocad2024.DependencyInjection.csproj",
"DUI3-DX\\Converters\\Autocad\\Speckle.Converters.Autocad2024\\Speckle.Converters.Autocad2024.csproj",
"DUI3-DX\\Converters\\Autocad\\Speckle.Converters.AutocadShared\\Speckle.Converters.AutocadShared.shproj",
"DUI3-DX\\Converters\\Revit\\Speckle.Converters.Revit2023.DependencyInjection\\Speckle.Converters.Revit2023.DependencyInjection.csproj",
"DUI3-DX\\Converters\\Revit\\Speckle.Converters.Revit2023.Tests\\Speckle.Converters.Revit2023.Tests.csproj",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Speckle.Connectors.Autocad.Filters;
using Speckle.Connectors.Autocad.HostApp;
using Speckle.Connectors.Autocad.Interfaces;
using Speckle.Connectors.Autocad.Operations.Receive;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Connectors.Autocad.Plugin;
using Speckle.Connectors.DUI;
Expand All @@ -19,7 +18,7 @@
using Speckle.Connectors.Utils.Operations;
using Speckle.Core.Models.GraphTraversal;

namespace Speckle.Connectors.Civil3d.DependencyInjection;
namespace Speckle.Connectors.Autocad.DependencyInjection;

public class Civil3dConnectorModule : ISpeckleModule
{
Expand All @@ -44,7 +43,6 @@ public void Load(SpeckleContainerBuilder builder)
builder.AddSingleton(DefaultTraversal.CreateTraversalFunc());

// Object Builders
builder.AddScoped<IHostObjectBuilder, AutocadHostObjectBuilder>();
builder.AddScoped<IRootObjectBuilder<AutocadRootObject>, AutocadRootObjectBuilder>();

// Register bindings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ public void Command()

var builder = SpeckleContainerBuilder.CreateInstance();

#if CIVIL3D
#if CIVIL3D2024
AutocadSettings autocadSettings = new (HostApplications.Civil3D, HostAppVersion.v2024);
#elif AUTOCAD2023
AutocadSettings autocadSettings = new(HostApplications.AutoCAD, HostAppVersion.v2023);
#else
AutocadSettings autocadSettings = new(HostApplications.AutoCAD, HostAppVersion.v2023);
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2024.DependencyInjection\Speckle.Converters.Autocad2024.DependencyInjection.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Autofac\Speckle.Autofac.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Utils\Speckle.Connectors.Utils.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
"resolved": "0.9.5",
"contentHash": "oU/L7pN1R7q8KkbrpQ3WJnHirPHqn+9DEA7asOcUiggV5dzVg1A/VYs7GOSusD24njxXh03tE3a2oTLOjt3cVg=="
},
"Autofac": {
"type": "Transitive",
"resolved": "5.2.0",
"contentHash": "V8dBH0dsv75uDzl7Sw+HkhKDPUw2eXnlMjcSVMH+tLo2s67MpTKGyDj1pDcpR+IF2u4YRs0s3/x7R88YJzIWvg==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.1.0"
}
},
"GraphQL.Client": {
"type": "Transitive",
"resolved": "6.0.0",
Expand Down Expand Up @@ -469,6 +477,21 @@
"Speckle.Core": "[2.0.999-local, )"
}
},
"speckle.converters.autocad2024": {
"type": "Project",
"dependencies": {
"Speckle.AutoCAD.API": "[2024.0.0, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
}
},
"speckle.converters.autocad2024.dependencyinjection": {
"type": "Project",
"dependencies": {
"Autofac": "[5.2.0, )",
"Speckle.Converters.Autocad2024": "[2.0.999-local, )",
"Speckle.Converters.Common.DependencyInjection": "[2.0.999-local, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Speckle.Autofac.DependencyInjection;
using Speckle.Converters.Autocad;
using Speckle.Converters.Common;
using Speckle.Converters.Common.DependencyInjection;

namespace Speckle.Converters.Autocad20243.DependencyInjection;

public class AutocadConverterModule : ISpeckleModule
{
public void Load(SpeckleContainerBuilder builder)
{
builder.AddConverterCommon<AutocadRootToHostConverter, AutocadToSpeckleUnitConverter, UnitsValue>();

// single stack per conversion
builder.AddScoped<IConversionContextStack<Document, UnitsValue>, AutocadConversionContextStack>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common.DependencyInjection\Speckle.Converters.Common.DependencyInjection.csproj" />
<ProjectReference Include="..\Speckle.Converters.Autocad2024\Speckle.Converters.Autocad2024.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Autofac" Version="5.2.0"/>
</ItemGroup>

</Project>
Loading

0 comments on commit f3d823c

Please sign in to comment.