diff --git a/.github/ISSUE_TEMPLATE/06_question.md b/.github/ISSUE_TEMPLATE/06_question.md index 2e4a3d80..7fa349ea 100644 --- a/.github/ISSUE_TEMPLATE/06_question.md +++ b/.github/ISSUE_TEMPLATE/06_question.md @@ -8,4 +8,4 @@ labels: "type:question" - \ No newline at end of file + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3f70af9c..6aefc564 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -24,4 +24,4 @@ Closes # ### Additional comments - \ No newline at end of file + diff --git a/PowershellScript.ps1 b/PowershellScript.ps1 index f22b7164..c4f73ce5 100644 --- a/PowershellScript.ps1 +++ b/PowershellScript.ps1 @@ -1,12 +1,12 @@ using namespace System.IO using namespace System.Collections.Generic -$softwareName = Read-Host "Please enter the software name." +$RFEM6 = Read-Host "Please enter the software name." -# Replace occurrences of "SoftwareName" in all files +# Replace occurrences of "RFEM6" in all files Get-ChildItem -File -Recurse | ForEach-Object { try { - (Get-Content $_.FullName) -replace 'SoftwareName', $softwareName | Set-Content $_.FullName + (Get-Content $_.FullName) -replace 'RFEM6', $RFEM6 | Set-Content $_.FullName } catch {} } @@ -16,11 +16,11 @@ $stack = [Stack[string]]::new() $allPaths = [List[string]]::new() -# Get all files and directories containing "SoftwareName" recursively +# Get all files and directories containing "RFEM6" recursively Get-ChildItem -Recurse -Directory | ForEach-Object { $dirpath = $_.FullName $dirname = Split-Path $dirpath -Leaf - if ($dirname.Contains("SoftwareName")) + if ($dirname.Contains("RFEM6")) { Write-Host "dirpath: " $dirpath $stack.Push($dirpath) @@ -32,7 +32,7 @@ Get-ChildItem -Recurse -Directory | ForEach-Object { foreach ($file in [Directory]::EnumerateFiles($dirpath)) { $filename = [Path]::GetFileName($file) - if ($filename.Contains('SoftwareName') -and -not $allPaths.Contains($file)) + if ($filename.Contains('RFEM6') -and -not $allPaths.Contains($file)) { Write-Host "filepath: " $file $stack.Push($file) @@ -43,7 +43,7 @@ Get-ChildItem -Recurse -Directory | ForEach-Object { # Add root files Get-ChildItem -File | ForEach-Object { - if ($_.FullName.Contains("SoftwareName")) { + if ($_.FullName.Contains("RFEM6")) { Write-Host "filepath: " $_.FullName $stack.Push($_.FullName) } @@ -56,12 +56,12 @@ while ($stack.Count) { $filename = [Path]::GetFileName($poppedFullName) - if($filename.Contains('SoftwareName') -and $pathExists) + if($filename.Contains('RFEM6') -and $pathExists) { - $newName = $filename.Replace('SoftwareName', $softwareName) + $newName = $filename.Replace('RFEM6', $RFEM6) Write-Host "Renaming: " $poppedFullName " to: " $newName Rename-Item -LiteralPath $poppedFullName -NewName $newName #-WhatIf } -} \ No newline at end of file +} diff --git a/RFEM6_Adapter/CRUD/Create/Node.cs b/RFEM6_Adapter/CRUD/Create/Node.cs new file mode 100644 index 00000000..af22ad33 --- /dev/null +++ b/RFEM6_Adapter/CRUD/Create/Node.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using BH.oM.Adapter; +using BH.oM.Structure.Elements; + +using rfModel = Dlubal.WS.Rfem6.Model; + +namespace BH.Adapter.RFEM6 +{ + public partial class RFEM6Adapter + { + private bool CreateCollection(IEnumerable bhNodes) + { + + //NOTE:A geometric object has, in general, a parent_no = 0. The parent_no parameter becomes significant for example with loads. + int nodeId = model.get_first_free_number(rfModel.object_types.E_OBJECT_TYPE_NODE, 0); + + for(int i = 0; i < bhNodes.Count(); i++) + { + Node bhNode = bhNodes.ToList()[i]; + + rfModel.node rfNode = new rfModel.node() + { + no = nodeId+i, + coordinates = new rfModel.vector_3d() { x = bhNode.Position.X, y = bhNode.Position.Y, z = bhNode.Position.Z }, + coordinate_system_type = rfModel.node_coordinate_system_type.COORDINATE_SYSTEM_CARTESIAN, + coordinate_system_typeSpecified = true, + comment = "concrete part" + }; + model.set_node(rfNode); + + } + + + return true; + } + } +} diff --git a/SoftwareName_Adapter/CRUD/Create/_ICreate.cs b/RFEM6_Adapter/CRUD/Create/_ICreate.cs similarity index 83% rename from SoftwareName_Adapter/CRUD/Create/_ICreate.cs rename to RFEM6_Adapter/CRUD/Create/_ICreate.cs index f1fdb844..fd65d1e7 100644 --- a/SoftwareName_Adapter/CRUD/Create/_ICreate.cs +++ b/RFEM6_Adapter/CRUD/Create/_ICreate.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. * @@ -28,9 +28,9 @@ using System.Text; using System.Threading.Tasks; -namespace BH.Adapter.SoftwareName +namespace BH.Adapter.RFEM6 { - public partial class SoftwareNameAdapter : BHoMAdapter + public partial class RFEM6Adapter : BHoMAdapter { // NOTE: CRUD folder methods // All methods in the CRUD folder are used as "back-end" methods by the Adapter itself. @@ -48,9 +48,23 @@ protected override bool ICreate(IEnumerable objects, ActionConfig actionCo // In other words: foreach (T obj in objects) { - success &= Create(obj as dynamic); - } + //success &= Create(obj as dynamic); + if (objects.Count() > 0) + { + //AppLock(); + try + { + model.begin_modification("Geometry"); + success = CreateCollection(objects as dynamic); //Calls the correct CreateCollection method based on dynamic casting + } + finally + { + //AppUnlock(); + model.finish_modification(); + } + } + } // Then place the specific Create methods below this method or, better, in separate file for each object type. return success; } @@ -70,7 +84,7 @@ protected override bool ICreate(IEnumerable objects, ActionConfig actionCo // Fallback case. If no specific Create is found, here we should handle what happens then. protected bool Create(IBHoMObject obj) { - BH.Engine.Base.Compute.RecordError("No specific Create method found for {obj.GetType().Name}."); + BH.Engine.Base.Compute.RecordError("No specific Create method found for" + obj.GetType().Name); return false; } } diff --git a/SoftwareName_Adapter/CRUD/Delete/_IDelete.cs b/RFEM6_Adapter/CRUD/Delete/_IDelete.cs similarity index 96% rename from SoftwareName_Adapter/CRUD/Delete/_IDelete.cs rename to RFEM6_Adapter/CRUD/Delete/_IDelete.cs index 6593ef83..964f82e2 100644 --- a/SoftwareName_Adapter/CRUD/Delete/_IDelete.cs +++ b/RFEM6_Adapter/CRUD/Delete/_IDelete.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. * @@ -27,9 +27,9 @@ using System.Text; using System.Threading.Tasks; -namespace BH.Adapter.SoftwareName +namespace BH.Adapter.RFEM6 { - public partial class SoftwareNameAdapter : BHoMAdapter + public partial class RFEM6Adapter : BHoMAdapter { // Basic Delete method that deletes objects depending on their Type and Id. // It gets called by the Push or by the Remove Adapter Actions. diff --git a/SoftwareName_Adapter/CRUD/Read/_IRead.cs b/RFEM6_Adapter/CRUD/Read/_IRead.cs similarity index 96% rename from SoftwareName_Adapter/CRUD/Read/_IRead.cs rename to RFEM6_Adapter/CRUD/Read/_IRead.cs index e56d858b..57fa90dd 100644 --- a/SoftwareName_Adapter/CRUD/Read/_IRead.cs +++ b/RFEM6_Adapter/CRUD/Read/_IRead.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. * @@ -29,9 +29,9 @@ using System.Text; using System.Threading.Tasks; -namespace BH.Adapter.SoftwareName +namespace BH.Adapter.RFEM6 { - public partial class SoftwareNameAdapter : BHoMAdapter + public partial class RFEM6Adapter : BHoMAdapter { /***************************************************/ /**** Adapter overload method ****/ diff --git a/SoftwareName_Adapter/CRUD/Update/_IUpdate.cs b/RFEM6_Adapter/CRUD/Update/_IUpdate.cs similarity index 95% rename from SoftwareName_Adapter/CRUD/Update/_IUpdate.cs rename to RFEM6_Adapter/CRUD/Update/_IUpdate.cs index 2509ee73..4cc7ec06 100644 --- a/SoftwareName_Adapter/CRUD/Update/_IUpdate.cs +++ b/RFEM6_Adapter/CRUD/Update/_IUpdate.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. * @@ -27,9 +27,9 @@ using System.Text; using System.Threading.Tasks; -namespace BH.Adapter.SoftwareName +namespace BH.Adapter.RFEM6 { - public partial class SoftwareNameAdapter : BHoMAdapter + public partial class RFEM6Adapter : BHoMAdapter { // This method gets called when appropriate by the Push method contained in the base Adapter class. // Unlike the Create, Delete and Read, this method already exposes a simple implementation: it calls Delete and then Create. diff --git a/SoftwareName_Adapter/Convert/FromSoftwareName/ExampleObject.cs b/RFEM6_Adapter/Convert/FromRFEM6/ExampleObject.cs similarity index 93% rename from SoftwareName_Adapter/Convert/FromSoftwareName/ExampleObject.cs rename to RFEM6_Adapter/Convert/FromRFEM6/ExampleObject.cs index 314318e4..432fdd86 100644 --- a/SoftwareName_Adapter/Convert/FromSoftwareName/ExampleObject.cs +++ b/RFEM6_Adapter/Convert/FromRFEM6/ExampleObject.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. * @@ -20,7 +20,7 @@ * along with this code. If not, see . */ -using BH.oM.Adapters.SoftwareName; +using BH.oM.Adapters.RFEM6; using BH.oM.Base; using System; using System.Collections.Generic; @@ -28,7 +28,7 @@ using System.Text; using System.Threading.Tasks; -namespace BH.Adapter.SoftwareName +namespace BH.Adapter.RFEM6 { public static partial class Convert { @@ -38,7 +38,7 @@ public static partial class Convert // Add methods for converting to BHoM from the specific software types. // Example: - public static BHoMObject FromSoftwareName(this ExampleObject node) + public static BHoMObject FromRFEM6(this ExampleObject node) { //Insert code for convertion throw new NotImplementedException(); diff --git a/SoftwareName_Adapter/Convert/ToSoftwareName/ExampleObject.cs b/RFEM6_Adapter/Convert/ToRFEM6/ExampleObject.cs similarity index 93% rename from SoftwareName_Adapter/Convert/ToSoftwareName/ExampleObject.cs rename to RFEM6_Adapter/Convert/ToRFEM6/ExampleObject.cs index e13ff4ea..56b29cab 100644 --- a/SoftwareName_Adapter/Convert/ToSoftwareName/ExampleObject.cs +++ b/RFEM6_Adapter/Convert/ToRFEM6/ExampleObject.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. * @@ -20,7 +20,7 @@ * along with this code. If not, see . */ -using BH.oM.Adapters.SoftwareName; +using BH.oM.Adapters.RFEM6; using BH.oM.Base; using System; using System.Collections.Generic; @@ -28,7 +28,7 @@ using System.Text; using System.Threading.Tasks; -namespace BH.Adapter.SoftwareName +namespace BH.Adapter.RFEM6 { public static partial class Convert { @@ -38,7 +38,7 @@ public static partial class Convert // Add methods for converting from BHoM to the specific software types // Example: - public static ExampleObject ToSoftwareName(this BHoMObject node) + public static ExampleObject ToRFEM6(this BHoMObject node) { //Insert code for convertion throw new NotImplementedException(); diff --git a/RFEM6_Adapter/RFEM6Adapter.cs b/RFEM6_Adapter/RFEM6Adapter.cs new file mode 100644 index 00000000..15877030 --- /dev/null +++ b/RFEM6_Adapter/RFEM6Adapter.cs @@ -0,0 +1,134 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using BH.Adapter; +using BH.oM.Base.Attributes; + + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Dlubal.WS.Rfem6.Application; +using Dlubal.WS.Rfem6.Model; +using BH.oM.Structure.Elements; +using BH.oM.Structure.SectionProperties; +using BH.oM.Structure.MaterialFragments; +using BH.oM.Structure.Constraints; +using BH.Engine.Base.Objects; +using BH.oM.Structure.SurfaceProperties; +using BH.oM.Structure.Loads; +using System.ServiceModel; + +namespace BH.Adapter.RFEM6 +{ + public partial class RFEM6Adapter : BHoMAdapter + { + /***************************************************/ + /**** Constructors ****/ + /***************************************************/ + + [Description("Adapter for RFEM6.")] + [Output("The created RFEM6 adapter.")] + public RFEM6Adapter(bool active = false) + { + // The Adapter constructor can be used to configure the Adapter behaviour. + // For example: + m_AdapterSettings.DefaultPushType = oM.Adapter.PushType.CreateOnly; // Adapter `Push` Action simply calls "Create" method. + + // See the wiki, the AdapterSettings object and other Adapters to see how it can be configured. + //AdapterIdFragmentType = typeof(RFEMId); + BH.Adapter.Modules.Structure.ModuleLoader.LoadModules(this); + + AdapterComparers = new Dictionary + { + {typeof(Bar), new BH.Engine.Structure.BarEndNodesDistanceComparer(3) }, + {typeof(Node), new BH.Engine.Structure.NodeDistanceComparer(3) }, + {typeof(ISectionProperty), new BHoMObjectNameOrToStringComparer() }, + {typeof(IMaterialFragment), new BHoMObjectNameComparer() }, + {typeof(LinkConstraint), new BHoMObjectNameComparer() }, + }; + + DependencyTypes = new Dictionary> + { + {typeof(Bar), new List { typeof(ISectionProperty), typeof(Node) } }, + {typeof(ISectionProperty), new List { typeof(IMaterialFragment) } }, + {typeof(RigidLink), new List { typeof(LinkConstraint), typeof(Node) } }, + {typeof(FEMesh), new List { typeof(ISurfaceProperty), typeof(Node) } }, + {typeof(ISurfaceProperty), new List { typeof(IMaterialFragment) } }, + {typeof(Panel), new List { typeof(ISurfaceProperty) } }, + {typeof(ILoad), new List { typeof(Loadcase) } }, + {typeof(LoadCombination), new List { typeof(Loadcase) } } + }; + + + + if (active) + { + // creates new model + //string modelName = "MyTestModel"; + //string modelUrl = application.new_model(modelName); + + + string modelUrl = application.get_active_model(); + + // connects to RFEM6/RSTAB9 model + model = new RfemModelClient(Binding, new EndpointAddress(modelUrl)); + model.reset(); + + + } + } + + // You can add any other constructors that take more inputs here. + + /***************************************************/ + /**** Private Fields ****/ + /***************************************************/ + + // You can add any private variable that should be in common to any other adapter methods here. + // If you need to add some private methods, please consider first what their nature is: + // if a method does not need any external call (API call, connection call, etc.) + // we place them in the Engine project, and then reference them from the Adapter. + // See the wiki for more information. + + + //RFEM stuff ---------------------------- + RfemModelClient model; + public static EndpointAddress Address { get; set; } = new EndpointAddress("http://localhost:8081"); + + private static BasicHttpBinding Binding + { + get + { + BasicHttpBinding binding = new BasicHttpBinding { SendTimeout = new TimeSpan(0, 0, 180), UseDefaultWebProxy = true, }; + return binding; + } + } + private static RfemApplicationClient application = new RfemApplicationClient(Binding, Address); + + /***************************************************/ + } +} diff --git a/RFEM6_Adapter/RFEM6_Adapter.csproj b/RFEM6_Adapter/RFEM6_Adapter.csproj new file mode 100644 index 00000000..c6395633 --- /dev/null +++ b/RFEM6_Adapter/RFEM6_Adapter.csproj @@ -0,0 +1,88 @@ + + + + net48 + RFEM6_Adapter + BH.Adapter.RFEM6 + true + ..\Build\ + + + + + + + + + + + + + + + + + C:\ProgramData\BHoM\Assemblies\Adapter_Engine.dll + false + false + + + C:\ProgramData\BHoM\Assemblies\Adapter_oM.dll + false + false + + + ..\..\..\ProgramData\BHoM\Assemblies\Analytical_oM.dll + + + C:\ProgramData\BHoM\Assemblies\BHoM.dll + false + false + + + C:\ProgramData\BHoM\Assemblies\BHoM_Adapter.dll + false + false + + + C:\ProgramData\BHoM\Assemblies\BHoM_Engine.dll + false + false + + + ..\..\..\ProgramData\BHoM\Assemblies\Data_oM.dll + + + ..\..\..\ProgramData\BHoM\Assemblies\Dimensional_oM.dll + + + ..\..\..\ProgramData\BHoM\Assemblies\Geometry_Engine.dll + + + ..\..\..\ProgramData\BHoM\Assemblies\Geometry_oM.dll + + + ..\packages\BHoM.Interop.RFEM6\RFEMWebServiceLibrary.dll + + + ..\..\..\ProgramData\BHoM\Assemblies\Spatial_Engine.dll + + + ..\..\..\ProgramData\BHoM\Assemblies\Spatial_oM.dll + + + ..\..\..\ProgramData\BHoM\Assemblies\Structure_AdapterModules.dll + + + ..\..\..\ProgramData\BHoM\Assemblies\Structure_Engine.dll + + + ..\..\..\ProgramData\BHoM\Assemblies\Structure_oM.dll + + + + + + + + diff --git a/SoftwareName_Engine/Compute/ExampleComputeMethod.cs b/RFEM6_Engine/Compute/ExampleComputeMethod.cs similarity index 98% rename from SoftwareName_Engine/Compute/ExampleComputeMethod.cs rename to RFEM6_Engine/Compute/ExampleComputeMethod.cs index 21580803..ac44554c 100644 --- a/SoftwareName_Engine/Compute/ExampleComputeMethod.cs +++ b/RFEM6_Engine/Compute/ExampleComputeMethod.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. * @@ -27,7 +27,7 @@ using System.ComponentModel; using System.Linq; -namespace BH.Engine.Adapters.SoftwareName +namespace BH.Engine.Adapters.RFEM6 { public static partial class Compute { diff --git a/SoftwareName_Engine/Create/ExampleCreateMethod.cs b/RFEM6_Engine/Create/ExampleCreateMethod.cs similarity index 96% rename from SoftwareName_Engine/Create/ExampleCreateMethod.cs rename to RFEM6_Engine/Create/ExampleCreateMethod.cs index 7513469a..89a4ebdb 100644 --- a/SoftwareName_Engine/Create/ExampleCreateMethod.cs +++ b/RFEM6_Engine/Create/ExampleCreateMethod.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. * @@ -20,7 +20,7 @@ * along with this code. If not, see . */ -using BH.oM.Adapters.SoftwareName; +using BH.oM.Adapters.RFEM6; using BH.oM.Base; using BH.oM.Base.Attributes; using System; @@ -28,7 +28,7 @@ using System.ComponentModel; using System.Linq; -namespace BH.Engine.Adapters.SoftwareName +namespace BH.Engine.Adapters.RFEM6 { public static partial class Create { diff --git a/SoftwareName_Engine/Modify/ExampleModifyMethod.cs b/RFEM6_Engine/Modify/ExampleModifyMethod.cs similarity index 96% rename from SoftwareName_Engine/Modify/ExampleModifyMethod.cs rename to RFEM6_Engine/Modify/ExampleModifyMethod.cs index 0f29996e..0c29593f 100644 --- a/SoftwareName_Engine/Modify/ExampleModifyMethod.cs +++ b/RFEM6_Engine/Modify/ExampleModifyMethod.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. * @@ -22,13 +22,13 @@ using BH.oM.Base; using BH.oM.Base.Attributes; -using BH.oM.Adapters.SoftwareName; +using BH.oM.Adapters.RFEM6; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; -namespace BH.Engine.Adapters.SoftwareName +namespace BH.Engine.Adapters.RFEM6 { public static partial class Modify { diff --git a/SoftwareName_Engine/Query/ExampleQueryMethod.cs b/RFEM6_Engine/Query/ExampleQueryMethod.cs similarity index 97% rename from SoftwareName_Engine/Query/ExampleQueryMethod.cs rename to RFEM6_Engine/Query/ExampleQueryMethod.cs index 1fb202d6..6734a7d6 100644 --- a/SoftwareName_Engine/Query/ExampleQueryMethod.cs +++ b/RFEM6_Engine/Query/ExampleQueryMethod.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. * @@ -20,7 +20,7 @@ * along with this code. If not, see . */ -using BH.oM.Adapters.SoftwareName; +using BH.oM.Adapters.RFEM6; using BH.oM.Base; using BH.oM.Base.Attributes; using System; @@ -28,7 +28,7 @@ using System.ComponentModel; using System.Linq; -namespace BH.Engine.Adapters.SoftwareName +namespace BH.Engine.Adapters.RFEM6 { public static partial class Query { diff --git a/SoftwareName_oM/SoftwareName_oM.csproj b/RFEM6_Engine/RFEM6_Engine.csproj similarity index 63% rename from SoftwareName_oM/SoftwareName_oM.csproj rename to RFEM6_Engine/RFEM6_Engine.csproj index b796ce0a..779baa29 100644 --- a/SoftwareName_oM/SoftwareName_oM.csproj +++ b/RFEM6_Engine/RFEM6_Engine.csproj @@ -1,9 +1,18 @@ - netstandard2.0 + net48 + ..\Build + + + + + + + + C:\ProgramData\BHoM\Assemblies\BHoM.dll diff --git a/SoftwareName_Toolkit.sln b/RFEM6_Toolkit.sln similarity index 76% rename from SoftwareName_Toolkit.sln rename to RFEM6_Toolkit.sln index 4d7481e8..c9396f95 100644 --- a/SoftwareName_Toolkit.sln +++ b/RFEM6_Toolkit.sln @@ -1,13 +1,13 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.32901.82 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SoftwareName_Adapter", "SoftwareName_Adapter\SoftwareName_Adapter.csproj", "{F84BEFC2-C702-4A86-9626-C7FA48785606}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RFEM6_Adapter", "RFEM6_Adapter\RFEM6_Adapter.csproj", "{F84BEFC2-C702-4A86-9626-C7FA48785606}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SoftwareName_Engine", "SoftwareName_Engine\SoftwareName_Engine.csproj", "{C68B4D77-E46D-41C9-A72C-F29984D8AB4A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RFEM6_Engine", "RFEM6_Engine\RFEM6_Engine.csproj", "{C68B4D77-E46D-41C9-A72C-F29984D8AB4A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SoftwareName_oM", "SoftwareName_oM\SoftwareName_oM.csproj", "{FA23407E-1C08-4183-A02E-A57FA9D09BCA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RFEM6_oM", "RFEM6_oM\RFEM6_oM.csproj", "{FA23407E-1C08-4183-A02E-A57FA9D09BCA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/SoftwareName_oM/ExampleObject.cs b/RFEM6_oM/ExampleObject.cs similarity index 98% rename from SoftwareName_oM/ExampleObject.cs rename to RFEM6_oM/ExampleObject.cs index f9b5db17..00e859c6 100644 --- a/SoftwareName_oM/ExampleObject.cs +++ b/RFEM6_oM/ExampleObject.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. * @@ -27,7 +27,7 @@ using System.ComponentModel; using System.Linq; -namespace BH.oM.Adapters.SoftwareName +namespace BH.oM.Adapters.RFEM6 { [Description("Object description in here. Will appear in the UI tooltip.")] public class ExampleObject : BHoMObject diff --git a/SoftwareName_Engine/SoftwareName_Engine.csproj b/RFEM6_oM/RFEM6_oM.csproj similarity index 76% rename from SoftwareName_Engine/SoftwareName_Engine.csproj rename to RFEM6_oM/RFEM6_oM.csproj index 55715bb8..65cbf175 100644 --- a/SoftwareName_Engine/SoftwareName_Engine.csproj +++ b/RFEM6_oM/RFEM6_oM.csproj @@ -1,11 +1,12 @@ - netstandard2.0 + net48 + ..\Build - + diff --git a/RenameToolkitFiles.bat b/RenameToolkitFiles.bat index 00c2b2ee..6beadb9a 100644 --- a/RenameToolkitFiles.bat +++ b/RenameToolkitFiles.bat @@ -1 +1 @@ -PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& './PowershellScript.ps1'" \ No newline at end of file +PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& './PowershellScript.ps1'" diff --git a/SoftwareName_Adapter/SoftwareNameAdapter.cs b/SoftwareName_Adapter/SoftwareNameAdapter.cs deleted file mode 100644 index fc1a54d4..00000000 --- a/SoftwareName_Adapter/SoftwareNameAdapter.cs +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.Adapter; -using BH.oM.Base.Attributes; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace BH.Adapter.SoftwareName -{ - public partial class SoftwareNameAdapter : BHoMAdapter - { - /***************************************************/ - /**** Constructors ****/ - /***************************************************/ - - [Description("Adapter for SoftwareName.")] - [Output("The created SoftwareName adapter.")] - public SoftwareNameAdapter() - { - // The Adapter constructor can be used to configure the Adapter behaviour. - // For example: - m_AdapterSettings.DefaultPushType = oM.Adapter.PushType.CreateOnly; // Adapter `Push` Action simply calls "Create" method. - - // See the wiki, the AdapterSettings object and other Adapters to see how it can be configured. - - // If your toolkit needs to define this.AdapterComparers and or this.DependencyTypes, - // this constructor has to populate those properties. - // See the wiki for more information. - } - - // You can add any other constructors that take more inputs here. - - /***************************************************/ - /**** Private Fields ****/ - /***************************************************/ - - // You can add any private variable that should be in common to any other adapter methods here. - // If you need to add some private methods, please consider first what their nature is: - // if a method does not need any external call (API call, connection call, etc.) - // we place them in the Engine project, and then reference them from the Adapter. - // See the wiki for more information. - - /***************************************************/ - } -} diff --git a/SoftwareName_Adapter/SoftwareName_Adapter.csproj b/SoftwareName_Adapter/SoftwareName_Adapter.csproj deleted file mode 100644 index 0986150c..00000000 --- a/SoftwareName_Adapter/SoftwareName_Adapter.csproj +++ /dev/null @@ -1,50 +0,0 @@ - - - - netstandard2.0 - SoftwareName_Adapter - BH.Adapter.SoftwareName - - - - - - - - - - - - - - C:\ProgramData\BHoM\Assemblies\Adapter_Engine.dll - false - false - - - C:\ProgramData\BHoM\Assemblies\Adapter_oM.dll - false - false - - - C:\ProgramData\BHoM\Assemblies\BHoM.dll - false - false - - - C:\ProgramData\BHoM\Assemblies\BHoM_Adapter.dll - false - false - - - C:\ProgramData\BHoM\Assemblies\BHoM_Engine.dll - false - false - - - - - - - - diff --git a/dependencies.txt b/dependencies.txt index c859174b..7c8f6217 100644 --- a/dependencies.txt +++ b/dependencies.txt @@ -1,3 +1,3 @@ BHoM/BHoM BHoM/BHoM_Engine -BHoM/BHoM_Adapter \ No newline at end of file +BHoM/BHoM_Adapter