Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 0 additions & 65 deletions RAM_Adapter/Properties/AssemblyInfo.cs

This file was deleted.

6 changes: 3 additions & 3 deletions RAM_Adapter/RAMAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
/***************************************************/

//Add any applicable constructors here, such as linking to a specific file or anything else as well as linking to that file through the (if existing) com link via the API
public RAMAdapter(string filePath = "", bool active = false)

Check warning on line 45 in RAM_Adapter/RAMAdapter.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

RAM_Adapter/RAMAdapter.cs#L45

Adapter constructor must contain a Description attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/HasDescriptionAttribute Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Method must contain an Output or MultiOutput attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/HasOutputAttribute
{
if (active)
{
Expand All @@ -65,7 +65,7 @@
ClearTempFiles(m_filePath);
try
{
m_IDBIO = m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IDBIO1_INT);
m_IDBIO = (IDBIO1)m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IDBIO1_INT);
// Create DB
m_IDBIO.CreateNewDatabase2(m_filePath, EUnits.eUnitsEnglish, "BHoM");
CloseDatabase();
Expand Down Expand Up @@ -96,7 +96,7 @@
{
return false;
}
m_IDBIO = m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IDBIO1_INT);
m_IDBIO = (IDBIO1)m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IDBIO1_INT);

int loadOutput = m_IDBIO.LoadDataBase2(m_filePath, "BHoM_UI"); //if 0 successful

Expand Down Expand Up @@ -124,7 +124,7 @@
}

// Object Model Interface
m_Model = m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IModel_INT);
m_Model = (IModel)m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IModel_INT);

return true;
}
Expand Down
155 changes: 35 additions & 120 deletions RAM_Adapter/RAM_Adapter.csproj
Original file line number Diff line number Diff line change
@@ -1,197 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BAA1043A-A029-492C-A1C1-B42FF856E808}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BH.Adapter.RAM</RootNamespace>
<AssemblyName>RAM_Adapter</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Build\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Build\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AssemblyTitle>RAM_Adapter</AssemblyTitle>
<Description>https://github.com/BHoM/RAM_Toolkit</Description>
<Company>Buro Happold</Company>
<Product>RAM_Adapter</Product>
<Copyright>Copyright © https://github.com/BHoM</Copyright>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<FileVersion>9.1.0.0</FileVersion>
</PropertyGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy &quot;$(TargetDir)$(TargetFileName)&quot; &quot;C:\ProgramData\BHoM\Assemblies&quot; /Y" />
</Target>
<ItemGroup>
<Reference Include="Adapter_Engine">
<HintPath>C:\ProgramData\BHoM\Assemblies\Adapter_Engine.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\Adapter_Engine.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Adapter_oM">
<HintPath>C:\ProgramData\BHoM\Assemblies\Adapter_oM.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\Adapter_oM.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Analytical_oM">
<HintPath>C:\ProgramData\BHoM\Assemblies\Analytical_oM.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\Analytical_oM.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="BHoM">
<HintPath>C:\ProgramData\BHoM\Assemblies\BHoM.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\BHoM.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="BHoM_Adapter">
<HintPath>C:\ProgramData\BHoM\Assemblies\BHoM_Adapter.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\BHoM_Adapter.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="BHoM_Engine">
<HintPath>C:\ProgramData\BHoM\Assemblies\BHoM_Engine.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\BHoM_Engine.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Data_oM">
<HintPath>C:\ProgramData\BHoM\Assemblies\Data_oM.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\Data_oM.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Dimensional_oM">
<HintPath>C:\ProgramData\BHoM\Assemblies\Dimensional_oM.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\Dimensional_oM.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Geometry_Engine">
<HintPath>C:\ProgramData\BHoM\Assemblies\Geometry_Engine.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\Geometry_Engine.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Geometry_oM">
<HintPath>C:\ProgramData\BHoM\Assemblies\Geometry_oM.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\Geometry_oM.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Interop.RAMDATAACCESSLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Interop.RamDataAccessLib_v15_x64.1.0.0\lib\Interop.RAMDATAACCESSLib.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Physical_oM">
<HintPath>C:\ProgramData\BHoM\Assemblies\Physical_oM.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\Physical_oM.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Spatial_Engine">
<HintPath>C:\ProgramData\BHoM\Assemblies\Spatial_Engine.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\Spatial_Engine.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Spatial_oM">
<HintPath>C:\ProgramData\BHoM\Assemblies\Spatial_oM.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\Spatial_oM.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Structure_AdapterModules">
<HintPath>C:\ProgramData\BHoM\Assemblies\Structure_AdapterModules.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\Structure_AdapterModules.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Structure_Engine">
<HintPath>C:\ProgramData\BHoM\Assemblies\Structure_Engine.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\Structure_Engine.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Structure_oM">
<HintPath>C:\ProgramData\BHoM\Assemblies\Structure_oM.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\Structure_oM.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Units_Engine">
<HintPath>C:\ProgramData\BHoM\Assemblies\Units_Engine.dll</HintPath>
<HintPath>$(ProgramData)\BHoM\Assemblies\Units_Engine.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Convert\ToBHoM.cs" />
<Compile Include="Convert\ToRAM.cs" />
<Compile Include="Create\Errors.cs" />
<Compile Include="Create\ContourLoadSet.cs" />
<Compile Include="Create\UniformLoadSet.cs" />
<Compile Include="Create\Grid.cs" />
<Compile Include="Create\Level.cs" />
<Compile Include="Create\Panel.cs" />
<Compile Include="Create\SurfaceProperty.cs" />
<Compile Include="Create\MaterialFragment.cs" />
<Compile Include="Create\SectionProperty.cs" />
<Compile Include="Create\Bar.cs" />
<Compile Include="Create\_Create.cs" />
<Compile Include="Delete\_Delete.cs" />
<Compile Include="AdapterActions\Pull.cs" />
<Compile Include="AdapterActions\Push.cs" />
<Compile Include="Read\Results.cs" />
<Compile Include="Read\Loads.cs" />
<Compile Include="Read\Bar.cs" />
<Compile Include="Read\ContourLoadSet.cs" />
<Compile Include="Read\Errors.cs" />
<Compile Include="Read\Grid.cs" />
<Compile Include="Read\Level.cs" />
<Compile Include="Read\MaterialFragment.cs" />
<Compile Include="Read\Panel.cs" />
<Compile Include="Read\SurfaceProperty.cs" />
<Compile Include="Read\SectionProperty.cs" />
<Compile Include="Read\UniformLoadSet.cs" />
<Compile Include="Read\_Read.cs" />
<Compile Include="Update\Bar.cs" />
<Compile Include="Update\_UpdateObjects.cs" />
<Compile Include="RAMAdapter.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Types\Comparer.cs" />
<Compile Include="Types\DependencyTypes.cs" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="Interop.RamDataAccessLib_v15_x64" Version="1.0.0" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<ProjectReference Include="..\RAM_Engine\RAM_Engine.csproj" />
<ProjectReference Include="..\RAM_oM\RAM_oM.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RAM_Engine\RAM_Engine.csproj">
<Project>{3d6ef1e1-51ea-4bea-9247-caa7df62bd61}</Project>
<Name>RAM_Engine</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\RAM_oM\RAM_oM.csproj">
<Project>{26d0ff3a-d1c7-428c-9517-8cf0ae9a7a8f}</Project>
<Name>RAM_oM</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
xcopy "$(TargetDir)$(TargetFileName)" "C:\ProgramData\BHoM\Assemblies" /Y
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
6 changes: 3 additions & 3 deletions RAM_Adapter/Read/Loads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private List<RAMPointGravityLoad> ReadPointGravityLoad(List<string> ids = null)
//Implement code for reading Gravity Loads
List<RAMPointGravityLoad> bhomPtGravLoads = new List<RAMPointGravityLoad>();

IGravityLoads1 ramGravityLoads = m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IGravityLoads_INT);
IGravityLoads1 ramGravityLoads = (IGravityLoads1)m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IGravityLoads_INT);

// Get all IWalls
List<IWall> allRamWalls = ReadRamWalls(m_Model);
Expand Down Expand Up @@ -202,8 +202,8 @@ private List<RAMLineGravityLoad> ReadLineGravityLoad(List<string> ids = null)
//Implement code for reading Gravity Loads
List<RAMLineGravityLoad> bhomLineGravLoads = new List<RAMLineGravityLoad>();

IModel ramModel = m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IModel_INT);
IGravityLoads1 ramGravityLoads = m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IGravityLoads_INT);
IModel ramModel = (IModel)m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IModel_INT);
IGravityLoads1 ramGravityLoads = (IGravityLoads1)m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IGravityLoads_INT);

// Get all IWalls
List<IWall> allRamWalls = ReadRamWalls(ramModel);
Expand Down
6 changes: 3 additions & 3 deletions RAM_Adapter/Read/Results.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private List<NodeReaction> ReadNodeReaction(List<string> ids = null)
//Implement code for reading Node Reactions
List<NodeReaction> bhomNodeReactions = new List<NodeReaction>();

IModel ramModel = m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IModel_INT);
IModel ramModel = (IModel)m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IModel_INT);

ILoadCases ramLoadCases = ramModel.GetLoadCases(EAnalysisResultType.RAMFrameResultType);
//Get IWalls
Expand Down Expand Up @@ -92,9 +92,9 @@ private List<RAMFactoredEndReactions> ReadBeamEndReactions(List<string> ids = nu
{
List<RAMFactoredEndReactions> barEndReactions = new List<RAMFactoredEndReactions>();

IModel ramModel = m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IModel_INT);
IModel ramModel = (IModel)m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IModel_INT);

IGravityLoads1 gravLoads = m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IGravityLoads_INT);
IGravityLoads1 gravLoads = (IGravityLoads1)m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IGravityLoads_INT);

List<IBeam> ramBeams = ReadRamBeams(ramModel);

Expand Down
4 changes: 2 additions & 2 deletions RAM_Adapter/Update/Bar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ protected bool Update(IEnumerable<Bar> bars)
{

//Access model
IDBIO1 RAMDataAccIDBIO = m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IDBIO1_INT);
IModel IModel = m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IModel_INT);
IDBIO1 RAMDataAccIDBIO = (IDBIO1)m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IDBIO1_INT);
IModel IModel = (IModel)m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IModel_INT);

foreach (Bar bar in bars)
{
Expand Down
4 changes: 0 additions & 4 deletions RAM_Adapter/packages.config

This file was deleted.

Loading