-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DUI3-325 Add Civil3d 2024 connector (#3531)
* adds converter and connector * fixes civil3d connector structure * fixes civil3d connector * removes converter * updates solution files * updates all * fixes civil3d connector merge * adds autocad2024 converter for the civil3d 2024 connector * removes changes to autocad settings * minor refactors * Update Applications.cs * adds shared connector module
- Loading branch information
1 parent
207753c
commit 85c2ff6
Showing
17 changed files
with
1,577 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...X/Connectors/Autocad/Speckle.Connectors.Autocad2023/Speckle.Connectors.Autocad2023.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...rs/Autocad/Speckle.Connectors.AutocadShared/DependencyInjection/Civil3dConnectorModule.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#if CIVIL3D | ||
using Speckle.Autofac.DependencyInjection; | ||
using Speckle.Connectors.Autocad.Bindings; | ||
using Speckle.Connectors.Autocad.Filters; | ||
using Speckle.Connectors.Autocad.Operations.Send; | ||
using Speckle.Connectors.DUI.Bindings; | ||
using Speckle.Connectors.DUI.Models.Card.SendFilter; | ||
using Speckle.Connectors.Utils.Builders; | ||
using Speckle.Connectors.Utils.Caching; | ||
using Speckle.Connectors.Utils.Operations; | ||
|
||
namespace Speckle.Connectors.Autocad.DependencyInjection; | ||
|
||
public class Civil3dConnectorModule : ISpeckleModule | ||
{ | ||
public void Load(SpeckleContainerBuilder builder) | ||
{ | ||
SharedConnectorModule.LoadShared(builder); | ||
|
||
// Operations | ||
builder.AddScoped<SendOperation<AutocadRootObject>>(); | ||
|
||
// Object Builders | ||
builder.AddScoped<IRootObjectBuilder<AutocadRootObject>, AutocadRootObjectBuilder>(); | ||
|
||
// Register bindings | ||
builder.AddSingleton<IBinding, ConfigBinding>("connectorName", "Civil3d"); // POC: Easier like this for now, should be cleaned up later | ||
builder.AddSingleton<IBinding, AutocadSendBinding>(); | ||
|
||
// register send filters | ||
builder.AddTransient<ISendFilter, AutocadSelectionFilter>(); | ||
|
||
// register send conversion cache | ||
builder.AddSingleton<ISendConversionCache, SendConversionCache>(); | ||
} | ||
} | ||
#endif |
40 changes: 40 additions & 0 deletions
40
...ors/Autocad/Speckle.Connectors.AutocadShared/DependencyInjection/SharedConnectorModule.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using Speckle.Autofac; | ||
using Speckle.Autofac.DependencyInjection; | ||
using Speckle.Connectors.Autocad.Bindings; | ||
using Speckle.Connectors.Autocad.HostApp; | ||
using Speckle.Connectors.Autocad.Interfaces; | ||
using Speckle.Connectors.Autocad.Plugin; | ||
using Speckle.Connectors.DUI; | ||
using Speckle.Connectors.DUI.Bindings; | ||
using Speckle.Connectors.DUI.Models; | ||
using Speckle.Connectors.DUI.WebView; | ||
using Speckle.Connectors.Utils; | ||
|
||
namespace Speckle.Connectors.Autocad.DependencyInjection; | ||
|
||
public static class SharedConnectorModule | ||
{ | ||
public static void LoadShared(SpeckleContainerBuilder builder) | ||
{ | ||
builder.AddAutofac(); | ||
builder.AddConnectorUtils(); | ||
builder.AddDUI(); | ||
builder.AddDUIView(); | ||
|
||
// Register other connector specific types | ||
builder.AddSingleton<IAutocadPlugin, AutocadPlugin>(); | ||
builder.AddTransient<TransactionContext>(); | ||
builder.AddSingleton(new AutocadDocumentManager()); // TODO: Dependent to TransactionContext, can be moved to AutocadContext | ||
builder.AddSingleton<DocumentModelStore, AutocadDocumentStore>(); | ||
builder.AddSingleton<AutocadContext>(); | ||
builder.AddSingleton<AutocadLayerManager>(); | ||
builder.AddSingleton<AutocadIdleManager>(); | ||
|
||
// Register bindings | ||
builder.AddSingleton<IBinding, TestBinding>(); | ||
builder.AddSingleton<IBinding, AccountBinding>(); | ||
builder.AddSingleton<IBinding, AutocadBasicConnectorBinding>(); | ||
builder.AddSingleton<IBasicConnectorBinding, AutocadBasicConnectorBinding>(); | ||
builder.AddSingleton<IBinding, AutocadSelectionBinding>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.