-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bjorn/cnx-828-shared-projects-for-connector (#419)
* ETABS21 - Shared project for converters - ETABS21 support * 21 and 22 Support - cPlugin.cs and Form1.cs in Shared defined as interfaces. Version specific implementations (basically just the namespaces) created in proj specific files - Plugins load and selection works in both ETABS versions * Form1 -> SpeckleForm * cPlugin base class - Better to have a cPlugin base class which ETABS21 and 22 inherit. Reduced code duplication - Better project namespace structure * s_modality
- Loading branch information
1 parent
13f48d9
commit 0be8897
Showing
16 changed files
with
512 additions
and
41 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
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
12 changes: 12 additions & 0 deletions
12
Connectors/CSi/Speckle.Connectors.ETABS21/Plugin/SpeckleForm.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,12 @@ | ||
using Speckle.Connectors.CSiShared; | ||
using Speckle.Sdk.Host; | ||
|
||
// NOTE: Plugin entry point must match the assembly name, otherwise ETABS hits you with a "Not found" error when loading plugin | ||
// Disabling error below to prioritize DUI3 project structure. Name of cPlugin class cannot be changed | ||
#pragma warning disable IDE0130 | ||
namespace Speckle.Connectors.ETABS21; | ||
|
||
public class SpeckleForm : SpeckleFormBase | ||
{ | ||
protected override HostAppVersion GetVersion() => HostAppVersion.v2021; | ||
} |
12 changes: 12 additions & 0 deletions
12
Connectors/CSi/Speckle.Connectors.ETABS21/Plugin/cPlugin.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,12 @@ | ||
using Speckle.Connectors.CSiShared; | ||
|
||
// NOTE: Plugin entry point must match the assembly name, otherwise ETABS hits you with a "Not found" error when loading plugin | ||
// Disabling error below to prioritize DUI3 project structure. Name of cPlugin class cannot be changed | ||
#pragma warning disable IDE0130 | ||
namespace Speckle.Connectors.ETABS21; | ||
|
||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "<Pending>")] | ||
public class cPlugin : CSiSharedPluginBase | ||
{ | ||
protected override SpeckleFormBase CreateForm() => new SpeckleForm(); | ||
} |
8 changes: 8 additions & 0 deletions
8
Connectors/CSi/Speckle.Connectors.ETABS21/Properties/launchSettings.json
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,8 @@ | ||
{ | ||
"profiles": { | ||
"ETABS 21": { | ||
"commandName": "Executable", | ||
"executablePath": "C:\\Program Files\\Computers and Structures\\ETABS 21\\ETABS.exe" | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
Connectors/CSi/Speckle.Connectors.ETABS21/Speckle.Connectors.ETABS21.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net48</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<Platforms>AnyCPU</Platforms> | ||
<UseWindowsForms>true</UseWindowsForms> | ||
<UseWPF>true</UseWPF> | ||
<ETABSVersion>21</ETABSVersion> | ||
<DefineConstants>$(DefineConstants);ETABS21</DefineConstants> | ||
<EnableDynamicLoading>true</EnableDynamicLoading> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" /> | ||
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" /> | ||
|
||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Speckle.CSI.API" PrivateAssets="all" IncludeAssets="compile; build" VersionOverride="1.30.0"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Update="Plugin\SpeckleForm.cs"> | ||
<SubType>Form</SubType> | ||
</Compile> | ||
</ItemGroup> | ||
|
||
<Import Project="..\Speckle.Connectors.CSiShared\Speckle.Connectors.CSiShared.projitems" Label="Shared" /> | ||
|
||
</Project> |
Oops, something went wrong.